Rarest bytes

  • 10
  • Locked
Enter a file name from the console. Find the byte or bytes with the minimum number of repetitions. Display them on the screen, separated by spaces. Close the IO stream.
You can't complete this task, because you're not signed in.
Comments (6)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Jurij Thmsn
Level 29 , Flensburg, Germany
2 April 2021, 13:59
stumbled upon "least repeated". It means it should occur at least once, not 0 (not repeated) and not 2. Repetition - in my understanding - means, that it occurs at least two times, but nevermind. Passed validation by displaying every byte which occurred once.
Justin Smith
Level 38 , Greenfield, USA, United States
28 September 2021, 14:43
Yes, the conditions are not clear on this, but it means the bytes which occur in the least number (minimum once) in the file.
Level 23 , Columbia, United States
18 August 2020, 20:19
Interesting. Even though my code displayed the minimum values multiple times, it still accepted the solution. I guess it doesn't matter how many times the minimum values are displayed, as long as they're displayed? I wasn't able to get them to display only once due to a for loop. Maybe a Hashmap would've done it.
Level 30 , Veliko Turnovo, Bulgaria
28 November 2019, 17:53
i output all keys who's value's are equal to min and still the task failed?
Level 41
29 November 2019, 06:56
If you need help, something isn't right in your code, the server won't accept your solution (even if you are 100% sure that it is correct). Describe your question/issue in the HELP section at codegym.cc/help.
Fabian Andiel
Level 25 , Vienna, Austria
1 February 2020, 11:26
Now it does again. Do you see any error in my code now? Thx Fabian