Question:Sorted Array have given to you.now a hacker swap odd index value with other odd index value.WAP that serach the element and return it's index in logn complexity.
Example: original sorted array :{1,2,3,4,5,6,7,8}
swapped given array:{1,4,3,2,5,8,7,6},key,5(element for searching)
Output 4(it's index).
Example: original sorted array :{1,2,3,4,5,6,7,8}
swapped given array:{1,4,3,2,5,8,7,6},key,5(element for searching)
Output 4(it's index).