Skip to content
Jarviix

60-day SSE plan · Day 56 of 60

Cache (LRU) • Uber-style Ride Hailing • Two Pointers • Tech: Docker

Day56

60-day SSE plan

Cache (LRU) • Uber-style Ride Hailing • Two Pointers • Tech: Docker

Algorithm

DSA

Hard

Two Pointers — Trapping Rain Water (LC 42)

Compute trapped water using two-pointer approach.

Example

Input: [0,1,0,2,1,0,1,3,2,1,2,1] → Output: 6

Where it shows up

Resource aggregation, elevation maps, histogram problems.

Low-level design

LLD

Cache (LRU)

Requirements

  • Put/get with capacity; LRU eviction policy.

Expectations

  • Classes for LRUCache using LinkedHashMap or custom DLL+HashMap.
  • Complexity guarantees O(1) operations.

Where it shows up

Databases, OS page cache, web caching layers.

References

High-level design

HLD

Uber-style Ride Hailing

Requirements

  • Driver/rider match by proximity; live location; trip lifecycle; pricing.

Expectations

  • Geo-indexing (geohash), matching service, WS gateway, storage model.
  • Regional partitions, degradation strategies.

Where it shows up

Mobility platforms, logistics dispatch.

References

Today's deep-dive

Tech

Docker

Create multi-stage build for a Spring Boot app; add HEALTHCHECK; test graceful shutdown.

Where it shows up