-
hackerrank.com Practice>Python>Itertools>Compress the String!hackerrank.com 2019. 2. 7. 21:43728x90
Compress the String!
Tip
- This is quite simple problem if you understand how to use groupby()
- Focus two variables(k and g) are iterated from groupby()
- As an example groupby('aaabb'), g is 'aaa', and k is 'a'
Solution
728x90'hackerrank.com' 카테고리의 다른 글
hackerrank.com Practice>Python>Collections>Collections.namedtuple() (0) 2019.02.11 hackerrank.com Practice>Python>Collections>DefaultDict Tutorial (0) 2019.02.10 hackerrank.com Practice>Python>Sets>No Idea! (0) 2019.02.06 hackerrank.com Practice>Python>Strings>Merge the Tools! (0) 2019.02.04 hackerrank.com Practice>Python>Strings>The Minion Game (0) 2019.02.04