Blink Health Interview Question

Standard leet code question