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

Peak Element in a Mountain Array #310

Closed
its-amans opened this issue Oct 4, 2024 · 3 comments
Closed

Peak Element in a Mountain Array #310

its-amans opened this issue Oct 4, 2024 · 3 comments

Comments

@its-amans
Copy link

Problem Description:

You are given an integer mountain array (arr) of length n where the values increase to a peak element and then decrease.

Return the index of the peak element.

Your task is to solve it in O(log(n)) time complexity.

Example 1:

Input: arr = [0,1,0]

Output: 1

Example 2:

Input: arr = [0,2,1,0]

Output: 1

Constraints:

3 <= arr.length <= 105
0 <= arr[i] <= 106

Copy link

github-actions bot commented Oct 4, 2024

Thank you for raising a issue, Hope you enjoing the open source. we try to reply or assign as soon possibe. Connect with mentor.

@its-amans
Copy link
Author

Hi @Saloni6111
I would like to implement cpp solution of this Problem . Please assign this problem to me

@its-amans
Copy link
Author

@Saloni6111 Is there any issue in problem ?

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

No branches or pull requests

2 participants