C# Sets and Dictionaries Advanced - Exercise задачата е 07. The V-Logger
получавам 80/100 Outputa го получавам https://pastebin.com/BUVpUWwf
получавам 80/100 Outputa го получавам https://pastebin.com/BUVpUWwf
That is quite some hefty code to look through, but the first thing that stands out is that the assignment says that if the V-Logger has no followers, then you should print out only the first line: "(in case the vlogger has no followers, print just the first line, which is described below)". Your code otherwise shows that you can correctly manipulate collections, so try to implement some private-helper methods to sort out the final collections and output-result, example:
static Dictionary<string, List<string>> SortVlog(Dictionary<string, HashSet<string>> dictFollowers)
{
dictFollowers = dictFollowers
.OrderByDescending(x => x.Value.Count)
.ToDictionary(key => key.Key, value => value.Value);
foreach (var (member, followers) in dictFollowers)
{
dictFollowers[member].Sort();
}
return dictFollowers;
}
Hello to everybody,
I would really appreciate if somebody check my code, which is 70/100.
I can't found my mistake even I spend a few hours debugging.
https://pastebin.com/jsfQcGF1
https://softuni.bg/trainings/resources/officedocument/52725/sets-and-dictionaries-advanced-exercise-csharp-advanced-september-2020/3007
https://judge.softuni.bg/Contests/Practice/Index/1466#6
Everything super, just change
to:
as the break statement will interrupt the while-loop (and not just the if-statement).
Best,
@ Axiomatik ,
thanks a lot!
After I changed "break" to "continue" it gave me 100/100.
I'am very happy and I really appreciate your help!