Note: To pass all the tests you'll need to add additional conditions to make sure the left pointer is not out of scope of the array (it is less than the length of the array) and the right pointer is greater than zero (it traversed the array without finding a peak).
LeetCode: https://leetcode.com/u/OntFoQptTK/
LinkedIn: / wilkinsjohnstanley
GitHub: https://github.com/wilkinsjohnstanley
Watch video doing leetcode everyday until I get a job (day 93) online without registration, duration hours minute second in high quality. This video was added by user John Wilkins 24 December 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 308 once and liked it 8 people.