Leetcode Pattern Printing Problems