Mastery Progress
Big-O85%
Review Stats
12Cards
4Topics
Interview Revision Hub

Study smarter.
Ace the room.

Everything you need to review before your next session — complexities, patterns, flashcards, behavioral frameworks, and system design.

Big-O Complexity Reference

Hover any card to see the relative cost. Master the shape of each curve before your interview.

O(1)
Constant
Hash lookup · Array index · Stack push/pop
O(log n)
Logarithmic
Binary search · BST lookup · Balanced tree ops
O(n)
Linear
Single pass · Two pointers · BFS/DFS
O(n log n)
Linearithmic
Merge sort · Heap sort · Quick sort (avg)
O(n²)
Quadratic
Nested loops · Bubble sort · Selection sort
O(2ⁿ)
Exponential
Subset enumeration · Recursive Fibonacci
Interview tip: Always lead with your intuition before optimising. Interviewers score your reasoning process as heavily as the final answer. Say: "My initial approach is O(n²) — I see a hashmap optimisation that brings this to O(n) time and O(n) space."

Common operation complexities

Structure Access Search Insert Delete Space
ArrayO(1)O(n)O(n)O(n)O(n)
Hash TableO(1)‡O(1)‡O(1)‡O(1)‡O(n)
Linked ListO(n)O(n)O(1)O(1)O(n)
BST (bal.)O(log n)O(log n)O(log n)O(log n)O(n)
Heap (min/max)O(1)O(n)O(log n)O(log n)O(n)
Graph (adj. list)O(V+E)O(1)O(E)O(V+E)

‡ Average case. Worst case is O(n) due to hash collisions.

Self-assessment — Complexity topics

Big-O notation & analysisAdvanced
Space complexity tradeoffsIntermediate
Amortised analysisBeginner

Data Structure Patterns

Recognise the pattern within the first 60 seconds. Each card maps a technique to its canonical LeetCode examples.

👆
Two Pointers
O(n) timeO(1) space
Use when: sorted array, palindrome check, pair sums.

Valid Palindrome · 3Sum · Container With Most Water · Remove Duplicates
🪟
Sliding Window
O(n) timevariable space
Use when: subarray/substring of max/min length or value.

Longest Substring No Repeat · Max Sum Subarray · Minimum Window Substring
🐇
Fast & Slow Pointers
O(n) timeO(1) space
Use when: cycle detection, middle of linked list.

Linked List Cycle · Happy Number · Find Duplicate Number
🗃
Merge Intervals
O(n log n)O(n) space
Use when: overlapping ranges, scheduling problems.

Merge Intervals · Insert Interval · Meeting Rooms II
🌲
Tree BFS / DFS
O(n) timeO(h) space
Use when: level-order traversal, path sums, subtree problems.

Level Order · Max Depth · Path Sum · Symmetric Tree
🗺
Graph BFS / DFS
O(V+E)visited set
Use when: connected components, shortest path (BFS), island problems.

Number of Islands · Clone Graph · Course Schedule
💾
Dynamic Programming
variesmemoisation / tabulation
Use when: overlapping subproblems + optimal substructure.

Climbing Stairs · Coin Change · Longest Common Subsequence
🔙
Backtracking
O(b^d)O(d) space
Use when: permutations, subsets, constraint satisfaction.

Subsets · Permutations · N-Queens · Word Search
Pattern recognition tip: Before writing code, say aloud: "This looks like a [pattern] problem because [reasoning]. I'll use [data structure] which gives me [complexity]." Interviewers love this narration — it signals experience even if your code has minor bugs.

Quick-fire Flashcards

Click a card to reveal the answer. Test yourself before every practice session.

Card 1 of 12  ·  0 revealed

Behavioral — STAR Framework

Every behavioral answer must hit all four stages. Practice 2–3 polished stories per category. Aim for under 2 minutes each.

S
Situation
Set the scene briefly. Give enough context that the interviewer understands the stakes without a long backstory. One or two sentences maximum.
T
Task
Clarify your specific responsibility. The interviewer wants to know what you owned — not what your team did collectively.
A
Action
Detail the 2–3 concrete steps you personally took. Use "I" not "we". This is where most of your time should go — 60% of the answer.
R
Result
Always quantify. "Reduced load time by 40%", "shipped 2 weeks ahead", "reduced churn by 15%". If you can't quantify, qualify with an observable outcome.

Common scenarios & story starters

Conflict / disagreement
"I disagreed with [X] because [concrete technical or strategic reason]. I prepared [evidence/data] and proposed [alternative]. We landed on [compromise] and I committed fully to the agreed direction."
Failure / setback
"We missed [metric/deadline] because [root cause I contributed to]. My specific mistake was [action]. I immediately [mitigation]. Going forward I implemented [system change] and since then [positive outcome]."
Leadership without authority
"I saw that [problem] was falling between teams. Without formal authority I [action to align stakeholders]. I created [artifact — doc, meeting, prototype] and got buy-in by [approach]. The result was [outcome]."
Handling ambiguity
"The requirements were unclear. Rather than waiting, I [first clarifying action]. I then scoped the problem to [constraint] and shipped an [MVP/timebox] to validate assumptions before committing to the full build."
Technical deep-dive
"The system was experiencing [symptom]. I hypothesised [cause]. I used [tooling/method] to confirm. The fix was [technical action]. After deployment [measurable improvement] — I also added [monitoring] so we'd catch this class of issue earlier."
Practice drill: Record yourself on your phone answering one question. Play it back and note every "um", "like", or filler. Then answer again — time yourself. Under 90 seconds is the sweet spot for most behavioral questions in an hour-long loop.

Communication & Presence

PrepLoom scores you on these dimensions. Internalise these habits before your session so they become automatic.

🧱
Structure your answer
Lead with your conclusion, then support it. Don't build up to the answer — start with it.
"There are three reasons. First… Second… Third… Therefore [conclusion]."
🔊
Think aloud
Narrate your reasoning in real time. Silence looks like confusion; thinking aloud looks like experience.
"I'm considering a greedy approach because the subproblems seem independent…"
Address edge cases
Before submitting code or finalising an answer, always run through: empty, single element, duplicates, max size, negative inputs.
"Edge cases to consider: empty array, single element, all duplicates, negative values…"
🏁
Close strong
When you finish, summarise your solution's tradeoffs. This signals senior-level thinking.
"Time: O(n log n), Space: O(1). A hash approach would trade space for O(n) time."
🎯
Clarify before coding
Always ask 1–2 clarifying questions. It buys thinking time and signals you don't rush into solutions without understanding requirements.
"Can the array be sorted? Are there duplicate values? What's the expected input size?"
📹
Presence & posture
Shoulders back, chin level, eye contact with the camera (not the screen). Open body language signals confidence even when you feel uncertain.
Look into the webcam lens when finishing a statement — it reads as direct eye contact.

Filler words to eliminate

um uh like you know so basically kind of sort of right? literally just actually

Replace every filler with a half-second of deliberate silence. Silence sounds confident on a call — fillers sound nervous.

WPM target: Aim for 140–170 words per minute for technical explanations. Slower is fine for complex reasoning. PrepLoom's communication score flags if you're going over 200 WPM (hard to follow) or under 100 WPM (sounds uncertain).

System Design Foundations

For senior and mid-level roles. Know the tradeoffs cold — interviewers want to see you reason about scale, not just name buzzwords.

Core concepts

CAP Theorem
A distributed system can only guarantee two of three: Consistency, Availability, and Partition Tolerance. Since partitions are unavoidable, you choose CP or AP depending on your use case.
Consistency Availability Partition
Load Balancing
Distributes incoming requests across multiple servers. Round-robin, least connections, and IP-hash are common strategies. L4 (transport) vs L7 (application) balancing have different tradeoffs.
Horizontal scale L4/L7 Health checks
Caching
Redis / Memcached for in-memory caching. Know cache-aside, write-through, and write-behind patterns. Expiry policies: TTL, LRU, LFU. Cache stampede and cache invalidation are classic hard problems.
Redis LRU / LFU Cache-aside
Database sharding
Horizontal partitioning of data across multiple nodes. Key sharding strategies: range-based, hash-based, directory-based. Hot shards and cross-shard queries are common failure modes to discuss.
Horizontal partition Hot shard Rebalancing
Message Queues
Kafka, RabbitMQ, SQS for async decoupling. At-least-once vs exactly-once delivery. Consumer groups, offset management, dead-letter queues. Use for fan-out, rate limiting, event sourcing.
Kafka At-least-once DLQ
CDN & Edge
CloudFront, Fastly, Cloudflare for static assets and edge compute. Cache-control headers, origin shield, invalidation strategies. Use for latency reduction and DDoS absorption.
PoPs Cache-control Edge compute

CAP theorem database guide

DatabaseTypeGuaranteesUse for
PostgreSQL / MySQLRDBMSCP ACIDFinancial transactions, strong consistency
DynamoDBNoSQL KVAP eventualHigh scale, flexible schema, low-latency reads
CassandraWide-columnAP tunableWrite-heavy, time-series, globally distributed
MongoDBDocumentCP configurableSemi-structured data, rapid iteration
RedisIn-memoryCPCache, session, pub/sub, leaderboards
ElasticsearchSearchAPFull-text search, log analytics

System design interview checklist

1. Clarify requirements
Ask about scale (users/day, data volume), read/write ratio, latency SLA, consistency requirements, and geographic distribution before drawing anything.
2. Capacity estimation
Back-of-envelope: QPS, storage per day/year, bandwidth. Use round numbers. Showing you can estimate order of magnitude matters more than precision.
3. High-level design
Sketch the main components: clients, LB, app servers, cache, DB, CDN. Label data flows. Don't go deep on any single component yet.
4. Deep dive
Let the interviewer guide which component to zoom in on. Discuss schema design, indexing strategy, replication, failover, and bottlenecks.

Now put it into practice.

Open the practice room and run a timed mock with an AI interviewer using what you've just reviewed.

Start a practice session →