We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Algorithms
- Strings
- Game of Thrones - I
- Discussions
Game of Thrones - I
Game of Thrones - I
Sort by
recency
|
1048 Discussions
|
Please Login in order to post a comment
C++ (more at https://github.com/IhorVodko/Hackerrank_solutions/tree/master , feel free to give a star :) )
def gameOfThrones(s): a = list(filter(lambda x: x % 2 != 0 or x == 1, Counter(s).values())) if a == [] or len(a) == 1: return "YES" return "NO"
Java