Pattern Program Java Leetcode Problems Sqlite