Blink Health interview question

Standard leet code question