Round 1 - Low Level Design
Questions:
- Tell me about a time when you went above and beyond to serve a customer. Why? How?
- Tell me about a time when you took an unpopular stance and your team members or manager disagreed. What? How did you navigate?
- Design Tic Tac Toe.
Candidate's Approach
No approach provided.
Interviewer's Feedback
No feedback provided.
Round 2 - Hiring Manager - System Design
Questions:
- Tell me about a time when you had to learn a new skillset beyond the scope of your day-to-day work.
- Conflict Resolution with manager.
- Design Instagram.
Candidate's Approach
No approach provided.
Interviewer's Feedback
No feedback provided.
Round 3 - Coding
Questions:
- Customer obsession.
- Dive deep.
- Medium question, didn't come across in Leetcode but could be solved using a priority queue in under 20 minutes.
Candidate's Approach
No approach provided.
Interviewer's Feedback
No feedback provided.
Round 4 - Coding
Questions:
- Deliver under strict deadlines.
- Tell me about a time when you had to make a decision between long-term value or short-term results.
- Design a lottery system where a customer can buy a lottery ticket ranging from 1 cent to 100 dollars. At the end of the sale of all lottery tickets, a winner will be chosen randomly, and the chances of winning should be according to the price paid for the ticket; in other words, the one who paid more should have more chances of winning.
import java.util.*; class LotterySystem { private final NavigableMap<Integer, String> ticketMap; private final Random random; private int totalWeight; public LotterySystem() { this.ticketMap = new TreeMap<>(); this.random = new Random(); this.totalWeight = 0; } public void buyTicket(String customer, int amount) { if (amount < 1 || amount > 10000) { throw new IllegalArgumentException("Ticket price must be between 1 cent and 100 dollars"); } totalWeight += amount; ticketMap.put(totalWeight, customer); } public String drawWinner() { if (ticketMap.isEmpty()) { throw new IllegalStateException("No tickets sold, cannot draw a winner"); } int luckyNumber = random.nextInt(totalWeight) + 1; return ticketMap.ceilingEntry(luckyNumber).getValue(); } public static void main(String[] args) { LotterySystem lottery = new LotterySystem(); lottery.buyTicket("Alice", 500); // Alice buys a ticket worth $5.00 lottery.buyTicket("Bob", 1000); // Bob buys a ticket worth $10.00 lottery.buyTicket("Charlie", 200); // Charlie buys a ticket worth $2.00 System.out.println("The winner is: " + lottery.drawWinner()); } }
Candidate's Approach
Interviewer had a certain solution in mind, struggled a lot to arrive at that, came up with something similar, not sure if this helped.
Interviewer's Feedback
No feedback provided.