JPMorganChase interview question

Count binary substrings from leetcode