Path With Maximum Minimum Value Leetcode Java