Java Basic Questions Leetcode Sql Server