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; \} 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
Get step-by-step solutions from verified subject matter experts
