LeetCode Question · Jan 2025 · Bangalore

Twilio | L3 | Bengaluru [Offer]

Eng Manager Phone Screen Junior
7 upvotes 1,149 views 1 reply

Question Details

YoE: 7 Experience: mid & large scale MNCs Date: November, 2024 Round 1 (Coding) Problem 1 /* Design a custom stack structure that supports standard stack operations while efficiently tracking both the minimum and maximum...

Full Details

YoE: 7
Experience: mid & large scale MNCs
Date: November, 2024

Round 1 (Coding)

Problem 1

/*
Design a custom stack structure that supports standard stack operations while efficiently tracking both the minimum and maximum elements at any given time. Implement the CustomMinMaxStack class with the following methods:
CustomMinMaxStack() \u2014 Initializes the stack.
void insert(int value) \u2014 Adds an element\'s value to the top of the stack.
void remove() \u2014 Deletes the element currently at the top.
int peek() \u2014 Retrieves the element currently at the top without removing it.
int findMin() \u2014 Fetches the smallest element in the stack.
int findMax() \u2014 Fetches the largest element in the stack.

Each method should operate with a time complexity of O(1).
 */

Note: Working modular code was expected by addressing all the edge cases.

Problem 2
Design a java class that takes requests and sends them to an api endpoint. The class shouldn\'t send the request to the API immediately but batch them once the number of piled requests exceeds a maximum size. One constraint here is that a request can only be held for a max certain duration and once the duration exceeds the request should be sent immediately without waiting for the next batch.

Note: Code was not expected. Discussion happened around approach and how thread & async operations would work here.

Round 2 (Design)

Design an \'Accounts System\' which will be integrated with multiple third party services.
As I understood, this was some existing system in Twilio and interviewer wanted to gauge my approach for it.
Functional Requirement
-Our system will act as a source of truth for any accountId with all relevant account details for an id stored within our system
-Third party services can make read/write requests to this system for any accountId

Note: Requirement was fairly stratight forward. Major discussions happened around API specs, DB choices, scalability, concurrency management.

Round 3 (HM)
Standard behavioural HM rounds. Scenario based mostly and past experiences.

Round 4 (Coding)
Similar to
https://leetcode.com/problems/minimum-knight-moves/description/

Thoughts: Pretty good interview process. HR was super transparent and thoughtful. Rounds were wrapped up within a week. Cumulative feedback was taken post first couple of rounds and then processed further.

Offer: https://leetcode.com/discuss/compensation/6091837/Twilio-or-L3-or-Offer

Free preview. Unlock all questions →

Topics

Os Concurrency System Design Stack