RBTree: simplified isBalanced
Comparison sort refactoring
Selection sort