Last active
August 29, 2015 14:25
-
-
Save weejulius/0d859e83fc56b998e232 to your computer and use it in GitHub Desktop.
freq-char
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn freq-of-cha | |
[str] | |
(->> str | |
frequencies | |
(sort-by val >) | |
first | |
second | |
(vector str))) | |
(defn answer | |
[col] | |
(->> col | |
(map freq-of-cha) | |
(sort-by second >) | |
ffirst)) | |
(answer ["abbcccc" "ddssbbbsssss" "uuuuuuuuuuuuuu" "coolololo"])] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment