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.
I think the best way to solve it is to use a BST.
Sadly, there's no suitable built-in BST in C# which is my favorite coding language.
So, I solved it in C++.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Minimum Loss
You are viewing a single comment's thread. Return to all comments →
I think the best way to solve it is to use a BST. Sadly, there's no suitable built-in BST in C# which is my favorite coding language. So, I solved it in C++.