Skip to content

Instantly share code, notes, and snippets.

@dinhhuydh
Created December 9, 2017 13:19
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 dinhhuydh/21659487928db4f3171bda0d178385e1 to your computer and use it in GitHub Desktop.
Save dinhhuydh/21659487928db4f3171bda0d178385e1 to your computer and use it in GitHub Desktop.
# 1. count number of words in a string
# E.g 1: count_words("this is an object") ==> 4
# 2. Count how many max numbers
# eg1: [3,5,6,3,6] => 2
# eg2: [1,5,6,6,6] => 3
# 3. Find longest string
# eg 1: ['a', 'bbbbb', 'zzz'] => 'bbbb'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment