📌What is LLD Interview?
Low Level Design (Machine Coding) rounds test your ability to:
📌Problem 1: Parking Lot System
Requirements
Key Classes
class ParkingLot { List<ParkingFloor> floors; List<EntryPoint> entries; List<ExitPoint> exits;}class ParkingFloor { int floorNumber; Map<SpotType, List<ParkingSpot>> spots;}class ParkingSpot { SpotType type; Vehicle vehicle; boolean isOccupied;}class Ticket { String id; ParkingSpot spot; LocalDateTime entryTime;}Design Patterns Used
📌Problem 2: BookMyShow
Requirements
Key Design Decisions
📌Problem 3: Splitwise
Requirements
Core Logic
interface SplitStrategy { Map<User, Double> split(double amount, List<User> users);}class EqualSplit implements SplitStrategy { public Map<User, Double> split(double amount, List<User> users) { double each = amount / users.size(); return users.stream() .collect(toMap(u -> u, u -> each)); }}📌Problem 4: Elevator System
Requirements
Algorithm: SCAN (Elevator Algorithm)
📌Problem 5: Snake and Ladder
Requirements
Key Classes
class Board { Map<Integer, Integer> snakes; // start -> end Map<Integer, Integer> ladders; // start -> end int size;}class Game { Board board; Queue<Player> players; Dice dice; void play() { while (!isGameOver()) { Player current = players.poll(); int roll = dice.roll(); movePlayer(current, roll); if (!hasWon(current)) { players.add(current); } } }}📌Problem 6: LRU Cache
Requirements
Implementation
class LRUCache<K, V> { private final int capacity; private final Map<K, Node<K, V>> map; private final DoublyLinkedList<K, V> list; public V get(K key) { if (!map.containsKey(key)) return null; Node<K, V> node = map.get(key); list.moveToFront(node); return node.value; } public void put(K key, V value) { if (map.containsKey(key)) { Node<K, V> node = map.get(key); node.value = value; list.moveToFront(node); } else { if (map.size() >= capacity) { Node<K, V> removed = list.removeLast(); map.remove(removed.key); } Node<K, V> newNode = new Node<>(key, value); list.addFirst(newNode); map.put(key, newNode); } }}📌Problem 7: Chess Game
Requirements
Design Highlights
📌Interview Tips
Our LLD course includes practice sessions for all 7 problems with expert feedback.