Leetcode Unique Binary String Problems Math