mirror of https://github.com/01-edu/public.git
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.
24 lines
637 B
24 lines
637 B
5 years ago
|
## uniqueoccurences
|
||
|
|
||
|
### Instructions
|
||
|
|
||
5 years ago
|
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.
|
||
5 years ago
|
|
||
5 years ago
|
If number of arguments is not 1 output nothing.
|
||
5 years ago
|
|
||
|
Only lower case characters will be given.
|
||
|
|
||
|
### Usage
|
||
|
|
||
|
```console
|
||
5 years ago
|
student@ubuntu:~/[[ROOT]]/test$ go build
|
||
5 years ago
|
student@ubuntu:~/[[ROOT]]/test$ ./main abbaac
|
||
5 years ago
|
true
|
||
5 years ago
|
student@ubuntu:~/[[ROOT]]/test$ ./main ab
|
||
5 years ago
|
false
|
||
5 years ago
|
student@ubuntu:~/[[ROOT]]/test$ ./main abcacccazb
|
||
5 years ago
|
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.
|