Interview Prep Hub

Crack your next
technical interview.

A curated collection of DSA patterns, system design concepts, behavioral guides, top resources, and a structured 4-week study plan to help you prepare with confidence.

DSA Patterns

Recognising the right pattern is faster than memorising individual solutions. These 16 patterns cover the vast majority of problems that appear in coding interviews.

01

Two Pointers

Use two index variables that move toward each other or in the same direction to solve array and string problems in linear time.

02

Sliding Window

Maintain a dynamic window of elements over a sequence to track running statistics without recomputing from scratch on every step.

03

Fast and Slow Pointers

Run two pointers at different speeds to detect cycles in linked lists or find the midpoint without extra space.

04

Merge Intervals

Sort intervals by start time, then greedily merge overlapping ones by comparing the current end with the next start.

05

Cyclic Sort

Place each number directly at its correct index in O(n) time when elements fall in a known range, then scan for misplaced values.

06

In-place Reversal

Reverse a linked list or sublist by re-wiring next pointers in a single pass without allocating extra nodes.

07

Tree BFS

Use a queue to visit nodes level by level, making it the natural fit for shortest-path and level-order problems on trees.

08

Tree DFS

Recursively explore each branch to its leaf before backtracking, covering path-sum, tree diameter, and ancestor queries.

09

Two Heaps

Keep a max-heap of lower half and a min-heap of upper half to answer median queries in logarithmic time as data streams in.

10

Subsets

Generate all combinations or permutations through backtracking, adding or skipping each element at every recursive level.

11

Binary Search

Eliminate half the search space each iteration whenever the input is sorted or the answer space is monotonically ordered.

12

Bitwise XOR

Exploit the self-cancelling property of XOR to find single numbers, missing values, or swap variables without a temp.

13

Top K Elements

Maintain a min-heap of size K so that the smallest seen value is always at the top, giving the K largest in O(n log K).

14

K-way Merge

Use a min-heap seeded with the first element of each sorted list to merge K lists in O(n log K) total time.

15

Topological Sort

Order nodes in a directed acyclic graph so every edge points forward, solving task scheduling and dependency resolution problems.

16

Dynamic Programming

Break problems into overlapping subproblems, store their solutions, and build the final answer bottom-up or top-down with memoization.

System Design Topics

Senior roles almost always include a system design round. Understanding these 10 concepts lets you structure any architecture conversation clearly and confidently.

Horizontal vs Vertical Scaling

Vertical scaling adds more CPU or RAM to an existing server, while horizontal scaling adds more machines behind a load balancer. Horizontal scaling is preferred for internet services because commodity hardware is cheap and a single machine always has a ceiling.

Load Balancing

A load balancer distributes incoming requests across a pool of servers using strategies like round robin, least connections, or IP hash. It also performs health checks and removes unhealthy instances from rotation automatically.

Caching Strategies

Cache-aside, read-through, and write-through are the three core patterns for keeping a cache in sync with a database. Choosing the right strategy involves trading consistency against latency and simplicity.

Database Sharding

Sharding partitions a large dataset across multiple database nodes, each owning a subset of rows determined by a shard key. It enables horizontal write scaling but complicates cross-shard joins and requires careful key selection to avoid hot spots.

CAP Theorem

A distributed system can guarantee at most two of Consistency, Availability, and Partition tolerance at the same time. Network partitions are unavoidable in practice, so most systems choose between CP and AP depending on business requirements.

Consistent Hashing

Consistent hashing maps both servers and keys to positions on a virtual ring so that adding or removing a node reassigns only a fraction of keys instead of remapping the entire dataset. It is the standard technique for distributing load in DHTs and distributed caches.

Rate Limiting

Rate limiting caps how many requests a client can make in a time window, protecting services from abuse and ensuring fair usage. Token bucket and sliding window counter are the most common algorithms, balancing burst tolerance against strict enforcement.

Message Queues

A message queue decouples producers and consumers so that spikes in write traffic are absorbed and processed at the consumer's pace. Systems like Kafka and RabbitMQ also provide durability, replay, and fan-out to multiple subscriber groups.

CDN

A Content Delivery Network caches static assets at edge nodes distributed around the world, serving content from a location close to the user to reduce latency and origin traffic. CDNs also absorb DDoS traffic and improve availability during origin failures.

Microservices vs Monolith

A monolith packages all functionality into one deployable unit, making local development and debugging straightforward at small scale. Microservices split the system into independently deployable services, each owning its data, enabling targeted scaling and team autonomy at the cost of distributed-systems complexity.

Key Resources

These are the most recommended resources across engineering communities. Quality over quantity: pick two or three and go deep rather than skimming all of them.

Behavioral Guide

Behavioral rounds are often the deciding factor at equal technical skill levels. Prepare structured answers in advance so you can deliver them calmly under pressure.

The STAR Method

Frame every behavioral answer with these four components in order. A tight STAR answer takes 90 seconds to 2 minutes and leaves no ambiguity about your role.

1

Situation

Set the scene with just enough context. Describe the team, project, or constraint that created the challenge.

2

Task

State your specific responsibility. Clarify what you personally were expected to deliver or decide.

3

Action

Walk through the concrete steps you took. Focus on your individual contributions, not the team's.

4

Result

Share a quantified outcome where possible. Mention what you learned if the result was mixed.

Common Questions

Tell me about a time you disagreed with a teammate.

Hint: Show that you can raise concerns respectfully, explain your reasoning, and reach alignment without damaging the relationship.

Describe a project where you had to learn something new quickly.

Hint: Highlight your learning process and how fast onboarding made a measurable difference to delivery.

Tell me about a time you failed and what you did next.

Hint: Demonstrate self-awareness and a concrete corrective action rather than deflecting responsibility.

Give an example of when you had to work under pressure.

Hint: Focus on how you triaged work, communicated tradeoffs to stakeholders, and kept quality acceptable.

Describe a time you led a project or initiative.

Hint: Even informal leadership counts. Emphasise how you aligned others and kept the work moving forward.

Tell me about a time you improved a process.

Hint: Quantify the improvement in time saved, error rate reduced, or developer experience gained.

Give an example of receiving difficult feedback.

Hint: Show that you listened actively, asked clarifying questions, and followed through on the change.

Describe a situation where you had to prioritise competing demands.

Hint: Explain your prioritisation framework and how you communicated tradeoffs clearly to those affected.

4-Week Study Plan

One month of focused, consistent practice is enough to make a significant improvement. Adjust the pace to fit your schedule, but keep the ordering: fundamentals first, then complexity.

1

Week 1

Arrays, Strings, and Hashmaps

Topics

  • Array traversal and in-place manipulation
  • String parsing and sliding window problems
  • Hashmap frequency counting and two-sum variants
  • Two-pointer techniques on sorted arrays
  • Prefix sums and running totals

Week Goal

Complete 15 to 20 LeetCode Easy problems across these topics. Aim for fluency in Python or your primary language before moving on.

2

Week 2

Trees, Graphs, and Recursion

Topics

  • Binary tree traversal (BFS and DFS)
  • Recursive tree problems: depth, diameter, lowest common ancestor
  • Graph representation: adjacency list vs matrix
  • BFS and DFS for graph traversal and connectivity
  • Backtracking for combinations and permutations

Week Goal

Solve 15 to 20 Medium problems. Practice drawing the recursion tree before writing code to catch off-by-one errors early.

3

Week 3

Dynamic Programming, Backtracking, and System Design Basics

Topics

  • 1D DP: climbing stairs, house robber, coin change
  • 2D DP: longest common subsequence, edit distance
  • Knapsack variants and interval DP
  • Backtracking: N-queens, Sudoku solver, word search
  • System design foundations: scalability, caching, databases

Week Goal

Complete 10 to 15 DP Mediums and study 3 to 4 system design case studies. Practice talking through your thought process out loud.

4

Week 4

Mock Interviews, Review, and Refinement

Topics

  • Timed mock interviews on Pramp or with a peer
  • Revisit every problem you failed or needed hints for
  • Review your Big-O complexity notes
  • Practice 3 to 5 behavioral STAR stories until they flow naturally
  • Read the job description and map your experience to its requirements

Week Goal

Do at least 4 full mock interviews. The goal is comfortable communication under pressure, not perfect solutions every time.

Missing a resource or pattern?

This hub is updated regularly. If you know a great resource that should be listed here, get in touch and we will review it.

Suggest a resource