Snap Finance Interview Question

Look for "candy" on leetcode