Please solve all these correctly as fast as possible.
6.Search 42 in the sorted array of Q. No. 4 using ternary search algorithm. Show the values of low, mid1, mid2, high at each step. -4 7.How are you going to count the number of inversions in an array in case of a bubble sort? merge sort and b) - (2+2) = 4 8.Propose a Quick Sort algorithm using the last element of each partition as pivot. Let, A = [5, 8, 2, 9, 7, 3, 1] Show the steps of the Quick Sort algorithm using the first element as pivot to sort 'A' array in descending order. Discuss the best case running time of the Quick Sort algorithm. (5+5+2) = 12
Please solve all these correctly as fast as possible.
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am