I'm trying to do an analysis of buildHeap vs. inserting an array of n values one at a time into a heap. I have a random case, best, and worst case. I was wondering if anyone knows what would actually be in an array to make the best and worst of a min heap?
For example, with n values, what would be in my array to give the slowest possible time to both buildheap and the insert function when creating a heap?
I understand the analysis but I just can't figure out what would give that worst case scenario.
Thanks in advance.