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.
Rarest bytes
- 10
Locked
Comments (6)
- Popular
- New
- Old
You must be signed in to leave a comment
Jurij Thmsn
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.
+1
Justin Smith
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.
0
Petros
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.
0
ilian44
28 November 2019, 17:53
i output all keys who's value's are equal to min and still the task failed?
0
Roman
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.
0
Fabian Andiel
1 February 2020, 11:26
Now it does again. Do you see any error in my code now? Thx Fabian
0