Two Pointers Question On Leetcode Problems On Stack