Pattern Program In Leetcode Solutions Java