Google Interview Questions
Anonymous User
387

Given a sorted Integer array, find the element with kth samllest absolute value. For example:
arr = [-3, -2, 0, 1, 5], k = 3. Should return -2. Since Abs(-2) = 2, which is the 3rd smallest abs value. Any idea on how to solve this problem in at least O(n) time complexity? Thanks

Comments (5)