change array length N param to const, add heap sort and test.