Commit Graph

3 Commits

Author SHA1 Message Date
Eric Curtin
59d5dcca1d heapsort implementation started at index 1
It is wasteful of the first element of the array, so start at 0.
Also std:swap was re-implemented just use swap available in C++ library
instead.
2020-01-06 11:33:08 +00:00
Eric Curtin
98143d9e36 variable x is unused (#698)
* variable x is unused

* Use std::endl and a blank line between functions

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-01-04 09:33:56 +01:00
Eric Curtin
e50d0ffffe Use getchar over getch (#681)
* Use getchar over getch

getch in Windows specific. Now the code will compile
and work on other platforms like Linux and macOS.

* Update and rename Heap Sort .cpp to heap_sort .cpp

* cpplint fixes

* Rename heap_sort .cpp to heap_sort.cpp
2019-12-16 13:21:16 +01:00