Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- namespace _04Problem_RoliTheCoder
- {
- class Program
- {
- static void Main(string[] args)
- {
- var test = new Dictionary<string, List<string> > ();
- List<string> nested = new List<string>();
- List<string> nested1 = new List<string>();
- List<string> nested2 = new List<string>();
- nested.Add("1");
- nested.Add("2");
- nested.Add("3");
- test.Add("firstString", nested);
- nested1.Add("aa");
- nested1.Add("aa");
- nested1.Add("aa");
- nested1.Add("aa");
- nested1.Add("aa");
- nested1.Add("aa");
- nested1.Add("aa");
- nested1.Add("aa");
- test.Add("secondString", nested1);
- nested2.Add("ajahahha");
- nested2.Add("ajahahha");
- nested2.Add("ajahahha");
- nested2.Add("ajahahha");
- test.Add("thirdString", nested2);
- foreach (var print in test.OrderByDescending(x => x.Value.Count()))
- {
- Console.WriteLine($"Key -{print.Key}");
- Console.WriteLine($"Value - {string.Join(" ", print.Value)}");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement