• + 0 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++.