Skip to content
New issue

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

Adding finding_max.cpp #17

Closed
wants to merge 1 commit into from
Closed

Adding finding_max.cpp #17

wants to merge 1 commit into from

Conversation

bulkpool
Copy link
Contributor

@bulkpool bulkpool commented Oct 13, 2020

This is my contribution for the issue #5 . I have added a cpp file of the solution for this issue. Please check it and suggest changes.

I have used the binary search algorithm with time complexity of O(log n).

@PrasannaAkolkar
Copy link
Collaborator

Please check for edge cases.

5
10 20 30 40 50
9

Output that your code gives for this is : 10
Please output -1 for such cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants