Generate Binary Numbers Leetcode Contest Solution