Problem
Java
eager approach - O(n)
1 | class Solution { |
Submission Detail
- 63 / 63 test cases passed.
- Runtime: 0 ms, faster than 100.00% of Java online submissions for Find Peak Element.
- Memory Usage: 41.3 MB, less than 66.17% of Java online submissions for Find Peak Element.
JavaScript
eager approach
1 | /** |
Submission Detail
- 63 / 63 test cases passed.
- Runtime: 123 ms, faster than 5.43% of JavaScript online submissions for Find Peak Element.
- Memory Usage: 42 MB, less than 73.96% of JavaScript online submissions for Find Peak Element.