Toptal Interview Question

Question about domino dots in a leetcode style question.