Did anybody solve Tree House problem using a different approach?

Hi, I’m a beginner.
I am curious to know whether anyone solved Tree House problem (given in May long challenge) using a different approach. I thought of solving it using dictionaries.
Did anyone solve it using STL maps?
Here is the link to problem: Link to tree house problem

Thank you!! In advance. :smile: