Skip to content
Jarviix

60-day SSE plan · Day 41 of 60

Parking Lot System • URL Shortener • Sliding Window • Tech: Cassandra

Day41

60-day SSE plan

Parking Lot System • URL Shortener • Sliding Window • Tech: Cassandra

Algorithm

DSA

Medium

Sliding Window — Minimum Window Substring (LC 76)

Find the smallest substring of s that contains all characters of t.

Example

Input: s="ADOBECODEBANC", t="ABC" → Output: "BANC"

Where it shows up

Token scanning, query parsing, log/event windowing.

Low-level design

LLD

Parking Lot System

Requirements

  • Multiple floors, spot types (Car/Bike/Truck).
  • Park, unpark, ticketing, fee calculation.

Expectations

  • Provide UML class diagram (ParkingLot, Floor, Spot, Vehicle, Ticket, Payment).
  • Implement core classes and simulate park/unpark; discuss extendability.

Where it shows up

Real parking garages in malls/airports.

High-level design

HLD

URL Shortener

Requirements

  • Shorten URLs, redirect keys, optional custom alias, basic stats.
  • Scale to millions of reads/day; low latency redirects.

Expectations

  • APIs, DB schema, key generation, cache-aside, sharding strategy.
  • Trade-offs: SQL vs NoSQL, consistency, TTL, analytics pipeline.

Where it shows up

Bitly/Twitter links, marketing campaigns, QR codes.

Today's deep-dive

Tech

Cassandra

Model a table for user_events with proper partition key; write queries; test CL=QUORUM reads/writes.

Where it shows up