InterviewLegend

Design a Data Structure

Alex Chen75 min readUpdated 197 real interview reports

Twilio likes to ask for a class. You get a short story from its product, plus three or four methods to write. Your class then runs against a list of calls, and every call has to return the right thing.

Five of these are built below as runnable problems. The first is the class Twilio asks more than any other, and the rest deal with time, corrections that arrive late, and choosing what to hand out next.

The brief can be as short as "build it object-oriented and clarify the edge cases." So ask what an empty call returns, how ties break, and whether time comes from a clock or an argument. Then name your structures and their costs before you write any code.

TwilioPremium lesson · Coding round

The 5 Twilio problems are below.

  1. A Premium questionCoding · Medium · Signature problem
  2. A Premium questionCoding · Medium
  3. A Premium questionCoding · Medium

+ 2 more in this lesson

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.