Pattern Program Java Leetcode Problems Sql