Colgate-Palmolive Interview Question

Difficulty of the question was leetcode easy