reset password
Author Message
mvalde50
Posts: 1
Posted 20:01 Nov 14, 2017 |

for the heap sort method are we suppose to create our own heap class? since a heap is a complete binary tree I know we can calculate the indexes for the children, so i'm confused whether or not to create one. would it be easier to?

kknaur
Posts: 540
Posted 20:04 Nov 14, 2017 |
mvalde50 wrote:

for the heap sort method are we suppose to create our own heap class? since a heap is a complete binary tree I know we can calculate the indexes for the children, so i'm confused whether or not to create one. would it be easier to?

You can if you want or you can create some private methods to create an array heap. It is up to you.