Patterns

mock interviews

For each problem: Identify pattern and problem and clarify inputs and constraints, Explain brute force and analyze time and space complexity, Optimize and analyze the patterns, structures, and algorithms needed, Implement the code, Analyze the time and space complexity and edge cases, and Walkthrough an example. Problems: Merge Intervals, Insert Interval, Non-overlapping Intervals

<aside>

amazon sde

</aside>

<aside>

daily structure:

1 hr	Review concept/pattern
2 hr	Solve 4–5 problems
1 hr	Review solutions deeply
1 hr	Behavioral preparation
1 hr	Mock interview / timed problem

problem strategy:

  1. Clarify inputs
  2. Explain brute force
  3. Optimize
  4. Write clean code + provide example walkthrough
  5. Analyze complexity of time + space
  6. Discuss edge cases

cheat sheets:

python cheat sheet

data struct + algo cheat sheet

object oriented programming concepts

recognizing patterns

behavioral prep

Must-Know Questions:

<aside>

https://leetcode.com/problem-list/esma9rtv/

https://youtube.com/playlist?list=PLtQWXpf5JNGJagakc_kBtOH5-gd8btjEW&si=IdcJv_WCzWhNuwSb

</aside>

Trees

  1. Maximum Depth of Binary Tree
  2. Same Tree
  3. Invert Binary Tree
  4. Diameter of Binary Tree
  5. Path Sum
  6. Binary Tree Level Order Traversal
  7. Lowest Common Ancestor of a Binary Tree

Graphs

  1. Number of Islands
  2. Flood Fill