0 0 votes There is a sorted array which is of very large size. In those elements every element are repeated more than once except one element. How much time it will take to find that element? O(1) O(n) O(nlogn) O(logn) I think its less than O(log n) (divide n conquer) but solution is O(n) Algorithms algorithms sorting time-complexity + – Pankaj Joshi 582 views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
0 0 votes Answer will be O(n) by divide and conquer also... f(n) { O(1); //checking with center element f(n/2); //for left half of array f(n/2); //for right half of array. } nitish1995 answered Apr 4, 2017 nitish1995 comment Share Follow 0 reply Please log in or register to add a comment.