Find Peak Element Leetcode Solution In Python