Iterables and Iterators
Problem link : https://www.hackerrank.com/challenges/iterables-and-iterators/problem
Difficulty : Medium
Tip
- As we can see from problem description, it's regarding combination
- We might be confused a bit due to that 'a' is appeared only once, or multiple
- If 'a' appeared only once, we can resolve it simply
- However, a appeared in multiple times
- we should generate all combination
- and check each one have 'a' or not
- Don't worry, combonation in itertools, will generate all of possible combination
Solution