Sorting, Intervals and Maps
Sorting turns up in Twilio's rounds inside other problems. Once you pick the key and the tie-break, the rest is a short loop over a hash map or a sorted list.
The three problems below each pick a sort key and a tie-break first. One orders values by a count, one merges intervals that carry extra data along, and one groups points by a shared coordinate.
Most bugs here come from rules the prompt leaves open. Which value wins a tie? Do two windows that touch at one point merge? Ask before you code, then test the answer you got before you submit.
TwilioPremium lesson · Coding round
The 3 Twilio problems are below.
- A Premium questionCoding · Easy
- A Premium questionCoding · Medium
- A Premium questionCoding · Medium
Each with hints, the follow-up and a tested solution.
Get the Twilio questions$49 a year · all 100 companies · cancel anytime
From 197 Twilio reports, forum threads behind logins and write-ups in Chinese.
Twilio interview guideKnow what Twilio asks before you walk in.
31 coding · 3 system design · 18 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.