add heapsort sample code