You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Clement Denis 26b3a37cc0 move subjects to folders 4 years ago
..
README.md

README.md

uniqueoccurences

Instructions

Write a program that outputs true if the number of occurrences of each character is unique, otherwise false. \n should be at the end of the line.

If number of arguments is not 1 output nothing.

Only lower case characters will be given.

Usage

student@ubuntu:~/[[ROOT]]/test$ go build
student@ubuntu:~/[[ROOT]]/test$ ./main abbaac
true
student@ubuntu:~/[[ROOT]]/test$ ./main ab
false
student@ubuntu:~/[[ROOT]]/test$ ./main abcacccazb
true

In first example, character 'a' has 3 occurrences, 'b' has 2 and 'c' has 1. No two characters have the same number of occurrences.