Skip to content

Instantly share code, notes, and snippets.

@weejulius
Last active August 29, 2015 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weejulius/0d859e83fc56b998e232 to your computer and use it in GitHub Desktop.
Save weejulius/0d859e83fc56b998e232 to your computer and use it in GitHub Desktop.
freq-char
(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