Fixed the C algorithm to work on all binary trees.