InterviewLegend

Sorting, Intervals and Maps

Alex Chen45 min readUpdated 197 real interview reports

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.

  1. A Premium questionCoding · Easy
  2. A Premium questionCoding · Medium
  3. 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.

Had your Twilio interview?Tell us what they asked. Reviewed before it goes in, never with your name.
Twilio interview guide

Know what Twilio asks before you walk in.

31 coding · 3 system design · 18 behavioral questions

Get Premium$49 a year · Cancel anytime
Or start freeNo card.

Get their questions first.

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.