A function to compare two children to determine which should come first.
< 0 if child1 should be before child2, 0 if the are equal, and > 0 otherwise
3.12
A function to compare two children to determine which should come first.