AnB: heapsort and binary_search