C algorithms. Trees, sort and search