We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doen's work for below Input: [1,1,3,1] 3
Expected: 2 Actual: -1
The text was updated successfully, but these errors were encountered:
i think you have not realize the premise: “an array sorted in ascending order”.
Sorry, something went wrong.
It is said in the first line of the code that, yoy may assume no duplicates occur in the array. So i guess the code does not work for duplicates.
your arr should be : [1, 1, 1, 3], while you search "1", it may not the right position what you want.
You are right, no duplicates are allowed :)
No branches or pull requests
Doen's work for below Input:
[1,1,3,1]
3
Expected: 2
Actual: -1
The text was updated successfully, but these errors were encountered: