Test heap algorithms