Add heap sort implementation

If you change start to be an uint, the cast will be no longer necessary.