Add solution for UVA problem 548 Tree
It's unnecessary to build the complete tree.