-
hackerrank.com Practice>Python>Strings>The Minion Gamehackerrank.com 2019. 2. 4. 20:04728x90
hackerrank.com Practice>Python>Strings>The Minion Game
'The Minion Game'
Tip
- Basic approach should be substring, this is not regarding combination and permutation
- the sequence of characters is not changed
- if input is BAN
- its substrings are like below
- B <- Stuart got 1
- BA <- Stuart got 1
- BAN <- Stuart got 1
- A <- Kevin got 1
- AN <- Kevin got 1
- N <- Stuart got 1
- i is index of input s
- s[i] is not vowel, Stuart got 3, we can move s[i+1]
- 3 is the lengh of s
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>Itertools>Compress the String! (0) 2019.02.07 hackerrank.com Practice>Python>Sets>No Idea! (0) 2019.02.06 hackerrank.com Practice>Python>Strings>Merge the Tools! (0) 2019.02.04