Trigger Interview Question

how to solve one leet code problem