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.
- Gena Playing Hanoi
- Discussions
Gena Playing Hanoi
Gena Playing Hanoi
Sort by
recency
|
8 Discussions
|
Please Login in order to post a comment
Java O(2 to the power of 2n)
JavaScript based on solution from @chuntao_liu_0118
Java8, based on @chuntao_liu_0118 states and Bidirectional BFS of @haiyuz226354. I don't know why but single directional BFS return tle in Java8...
Python 3, based on solution from @chuntao_liu_0118 in these comments. Splits up the logic a bit into a few functions with the intention to be slightly more readable. Also should work for arbitrarily many posts.
https://www.hackerrank.com/challenges/gena/forum all solution