Twilio interview question

Q: easy leetcode problem on arrays with two follow ups