CampusFlow
AlgorithmsInterview Patterns

💡 Interview Patterns

Master the most common coding interview patterns. Each pattern includes problem examples and links to detailed explanations.

Two Pointers

Easy-Medium

Two pointers traverse data in different directions or speeds

Sliding Window

Medium

Maintain a window that slides across the data structure

Binary Search

Easy-Medium

Divide search space in half repeatedly

DFS / Backtracking

Medium-Hard

Explore all possibilities, backtracking when needed

BFS on Trees/Graphs

Easy-Medium

Level-by-level traversal using a queue

Dynamic Programming

Medium-Hard

Optimize by storing subproblem solutions

Greedy Algorithms

Medium

Make locally optimal choices at each step

Heap / Priority Queue

Medium

Use heap to efficiently access min/max elements

Trie / Prefix Tree

Medium-Hard

Efficient string prefix search and storage

🏢 Company-Specific Focus

Google/Meta

Dynamic ProgrammingGraph (DFS/BFS)Binary SearchSliding Window

Focus on optimal solutions with clean code. Discuss tradeoffs.

Amazon

Arrays & SortingTwo PointersTreesGreedy

Focus on scalability and system-level thinking. OOP design matters.

Microsoft

TreesDynamic ProgrammingString ManipulationBacktracking

Write test cases first. Show edge case awareness.

Startups

General problem-solvingPractical algorithmsSystem design

Focus on clean, working code. Pragmatic solutions preferred over theoretical optimality.

🎯 Interview Success Tips

Before the Interview

  • • Review top 5 patterns thoroughly
  • • Practice on a whiteboard or text editor
  • • Know time/space complexity of common algorithms
  • • Prepare 2-3 questions to ask interviewers

During the Interview

  • • Clarify requirements and edge cases first
  • • Think out loud - explain your approach
  • • Start with brute force, then optimize
  • • Write clean, readable code with proper naming