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.
Thanks for this comment. I always use C++ and had implemented the recursive way. The problem was the number of parameters being passed to the recursive function. Having decreased that to 1, I got AC perfectly.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Cut the Tree
You are viewing a single comment's thread. Return to all comments →
Thanks for this comment. I always use C++ and had implemented the recursive way. The problem was the number of parameters being passed to the recursive function. Having decreased that to 1, I got AC perfectly.