Twilio Interview Question

Q: easy leetcode problem on arrays with two follow ups