This [question](https://www.hackerrank.com/contests/kodecrypt-2021-round-2-slot-4/challenges/the-tree-challenge) appeared in a contest on hacerrank.↵
↵
Any ideas on how to solve this tree problem efficiently? I got only 57.14 points with my binary search and preorder-pattern matching approach.↵
↵
[Here's my approach](https://pastebin.com/JgwawE4z)↵
↵
I'm asking for your help and approach because no submissions are available to see.
↵
Any ideas on how to solve this tree problem efficiently? I got only 57.14 points with my binary search and preorder-pattern matching approach.↵
↵
[Here's my approach](https://pastebin.com/JgwawE4z)↵
↵
I'm asking for your help and approach because no submissions are available to see.