Two Pointer Approach Leetcode Problems On Java