Bloomberg Interview Question

1. 1d candy crush question ( leetcode easy )