Code for problem 116.
Added code for linked tree.
Fix for compiling error.