How To Approach Leetcode Problems Java