Timeline for Find char which appears maximal number of times
Current License: CC BY-SA 4.0
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 11, 2018 at 21:31 | comment | added | Nikita B |
You should probably use File.ReadLines instead. Not that it matters much, since GroupBy will load the entire file into memory either way. Still , no reason to load it twice. This attempt to shock the interviewer can easily backfire, if you can't explain the implications of using LINQ very well during the interview. :)
|
|
| Aug 10, 2018 at 11:22 | comment | added | t3chb0t | Oh, no, you cannot, sorry, my bad - you want the key not the count ;-] | |
| Aug 10, 2018 at 10:59 | comment | added | t3chb0t |
Finally! I was already going to cry because nobody have posted it yet ;-) Additionally instead of sorting it you could just use .Max()
|
|
| Aug 10, 2018 at 9:05 | history | answered | HelloWorld | CC BY-SA 4.0 |