Solution for Binary Search Tree with Range Minimum Queries