[12.2 variant 1 in EPIJ v 1.6.1]
Variant 1 modifies the original problem by allowing the array to contain duplicates.
Is a O(log n) solution possible for this variant? I have a solution, but I think it’s O(n) in the worst case, O(log n) in the average case.
Search sorted array for entry equal to its index - variant 1
lgtout
#1
0 Likes