DSA-Questions
DSA-Questions copied to clipboard
Search in an almost sorted array
Hey, I'm participating in Hacktober fest and I want to add a question to the repository.
Question: Given an array that is sorted such that some elements are moved to either of the adjacent positions, i.e., A[i] may be present at A[i+1] or A[i-1]. Write an efficient function to search an element in this array. Basically, the element A[i] can only be swapped with either A[i+1] or A[i-1].
it will contain..
- [X] Question
- [X] Solution
- [X] Explaination
Kindly assign it to me and please add the label of hacktoberfest.
Kindly assign it to me and please add the label of hacktoberfest.
Please assign me this issue, I want to solve this in java language under Hacktoberfest'21.