Leetcode Count Setting A Table