Question: result BananaSort(arr) { if (arr.length == 1) { return arr; } else { divide arr into half1, half2 of equal sizes; sort half1 using algorithm

 result BananaSort(arr) \{ if (arr.length == 1) \{ return arr; \}

result BananaSort(arr) \{ if (arr.length == 1) \{ return arr; \} else \{ divide arr into half1, half2 of equal sizes; sort half1 using algorithm A; sort half2 using algorithm B; merge the two sorted halves in O(N) time; return the merged result; \} a) Give the runtime of BananaSort in big- notation. A: comparison sort*, B: counting sort b) Give the runtime of BananaSort in big-O notation. A: counting sort, B: quicksort c) Give the runtime of BananaSort in big-O notation. A: quicksort, B: BananaSort * comparison sort refers to the family of all comparison d) Give the runtime of Bananasort in Big- notation. sorting algorithms (including mergesort, insertion sort, etc.) A: BananaSort, 3: BananaSort

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!