If I have an array, and want to make a heap tree out of it using make heap and sort heap, how would I do it? I'm struggling because I didn't take any course in data structure.
Any help -in c++- will be appreciated :D**
> The thing is, I don't know what's the "Iterator" doing exactly and what's begin/end, how can I use arrays with the former piece of code? "Iterator" in this case is a generic term for the location of the first item in the collection and one past the last item … Read More
> Aha! so is it completely fine to drop "iterator" and template <typename Iterator> ? Yes, but only if you replace any use of Iterator with the appropriate corresponding type. In your example, int isn't the correct type; it would be int* because that's the correct "iterator" type for an … Read More
Edited by deceptikon