hackerrank tree