1.

Consider a sorted array of n numbers. What would be the time complexity of the best known algorithm to find a pair ‘a’ and ‘b’ such that |a-b| = k , k being a positive integer.(A) O(n)(B) O(n log n)(C) O(n ^ 2)(D) O(log n)

Answer»


Discussion

No Comment Found

Related InterviewSolutions