Leetcode Find The Maximum Of A Function