0 votes 0 votes Consider all the elements of an array is same and choosing pivot such a way that divides array into two equal parts. Then will it behave like QuickSort best case or worst case? Algorithms divide-and-conquer + – BHOJARAM asked Dec 17, 2021 BHOJARAM 493 views answer comment Share Follow See all 6 Comments See all 6 6 Comments reply raja11sep commented Dec 17, 2021 reply Follow Share NlogN in both the cases. (logN is tree height) 0 votes 0 votes BHOJARAM commented Dec 17, 2021 reply Follow Share As all the elements are same i.e. sorted so can’t it behave like quicksort worst case? 0 votes 0 votes raja11sep commented Dec 17, 2021 reply Follow Share choosing pivot such a way that divides array into two equal parts. 0 votes 0 votes AngshukN commented Dec 17, 2021 reply Follow Share How can you divide the array into two equal parts since the pivot itself is same as the rest of the elements 0 votes 0 votes raja11sep commented Dec 17, 2021 reply Follow Share It is given in the question. 0 votes 0 votes palashbehra5 commented Dec 24, 2021 reply Follow Share Or you can just pick the midpoint every time. Given that all elements are the same. 0 votes 0 votes Please log in or register to add a comment.