Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Task 1_3
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Text; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { var resultSb = new StringBuilder(); resultSb.AppendLine("Result:"); var letters = "ABAABACDAEDFICDFAAAAEEENENENENZFFG"; /* Your solution */ // implement here /* end */ /* Solution (example) */ var result = letters .ToList() .GroupBy(x => x) .ToDictionary(x => x.Key, x => x.Count()) .OrderByDescending(x => x.Value) .ThenBy(x => x.Key) .ToArray(); foreach (var item in result) { resultSb.AppendLine(string.Format("{0} - {1}", item.Key, item.Value)); } /* end */ /* Display result */ Console.WriteLine(resultSb); /* Should be next result: A - 9 E - 7 F - 4 N - 4 D - 3 B - 2 C - 2 G - 1 I - 1 Z - 1 */ } } }
run
|
edit
|
history
|
help
0
circular linked list
PolyMorphism
Valid Substring
asxs sxsd
asxsv sdsd
UPDJLJ87258 Orderby grouping understanding
z
merge 2 sorted array
asdxasxasdf
Planet-D v.0.6