Mock Week 1 — Easy and Medium Problems with Communication Focus

Sanjeev SharmaSanjeev Sharma
6 min read

Advertisement

Overview

Week 1 is about installing communication habits on problems you already know cold, not testing your algorithmic ceiling. The biggest reason candidates lose FAANG offers is not problem difficulty — it is silence. Interviewers consistently mark down candidates who go quiet for more than 60 seconds, even when their final code works correctly.

Why This Matters

FAANG technical interview preparation involves two parallel tracks that interviewers grade simultaneously: code correctness and signal quality. Signal quality means clarifying questions asked upfront, edge cases enumerated before coding, continuous narration while implementing, and an unprompted complexity statement at the end.

Week 1 trains signal quality on problems whose algorithms you already understand well — Best Time to Buy and Sell Stock, Product of Array Except Self, Maximum Depth of Binary Tree, and Validate BST. When the code is easy, your full cognitive budget goes toward building the communication habits that will carry you through harder problems in weeks 3 through 5.

The week 1 target is simple: solve 2 of 2 in under 45 minutes each with continuous talking and a clean complexity analysis at the close. If you cannot achieve that on easy and medium problems, do not advance to week 2.

Session Structure

StepPhaseActivityTime
1ClarifyRestate problem, ask 2 targeted questions3 min
2EdgesEnumerate empty input, single element, negatives2 min
3ApproachState brute force, then explain optimal5 min
4CodeImplement clean version with descriptive names20 min
5TraceWalk 2 examples plus 1 edge case10 min
6ComplexityState exact O() with full reasoning2 min

Core Framework — Week 1 Problem Pairs

Session A targets arrays. Session B targets trees. Run one per day, three times each week.

# Session A — Problem 1 (Easy): Best Time to Buy and Sell Stock
def max_profit(prices):
    min_price = float('inf')
    best = 0
    for p in prices:
        min_price = min(min_price, p)
        best = max(best, p - min_price)
    return best
 
 
# Session A — Problem 2 (Medium): Product of Array Except Self
def product_except_self(nums):
    n = len(nums)
    res = [1] * n
    left = 1
    for i in range(n):
        res[i] = left
        left *= nums[i]
    right = 1
    for i in range(n - 1, -1, -1):
        res[i] *= right
        right *= nums[i]
    return res
 
 
# Session B — Problem 1 (Easy): Maximum Depth of Binary Tree
def max_depth(root):
    if not root:
        return 0
    return 1 + max(max_depth(root.left), max_depth(root.right))
 
 
# Session B — Problem 2 (Medium): Validate Binary Search Tree
def is_valid_bst(root):
    def validate(node, lo, hi):
        if not node:
            return True
        if not (lo < node.val < hi):
            return False
        return validate(node.left, lo, node.val) and validate(node.right, node.val, hi)
    return validate(root, float('-inf'), float('inf'))
// Best Time to Buy and Sell Stock
function maxProfit(prices) {
  let minPrice = Infinity, best = 0;
  for (const p of prices) {
    minPrice = Math.min(minPrice, p);
    best = Math.max(best, p - minPrice);
  }
  return best;
}
 
// Product of Array Except Self
function productExceptSelf(nums) {
  const n = nums.length;
  const res = new Array(n).fill(1);
  let left = 1;
  for (let i = 0; i < n; i++) { res[i] = left; left *= nums[i]; }
  let right = 1;
  for (let i = n - 1; i >= 0; i--) { res[i] *= right; right *= nums[i]; }
  return res;
}
 
// Max Depth Binary Tree
function maxDepth(root) {
  if (!root) return 0;
  return 1 + Math.max(maxDepth(root.left), maxDepth(root.right));
}
 
// Validate BST
function isValidBST(root, lo = -Infinity, hi = Infinity) {
  if (!root) return true;
  if (root.val <= lo || root.val >= hi) return false;
  return isValidBST(root.left, lo, root.val) && isValidBST(root.right, root.val, hi);
}

Time: O(n) for arrays, O(n) for tree traversal Space: O(1) extra for arrays, O(h) recursion stack for trees

The Communication Script

Use these exact phrases to build the narration habit. Before coding:

  • "Let me restate the problem to make sure I understand it correctly."
  • "Edge cases I will consider: empty input, single element, negative numbers, duplicates."
  • "My brute force is X at O(n squared). The optimal uses Y for O(n)."

During coding, narrate every block:

  • "This loop builds the prefix product going left to right."
  • "Now I do a second pass right to left, multiplying by the running suffix."

After coding, trace explicitly:

  • "Let me walk through with input [1, 2, 3, 4]. After the left pass, res equals [1, 1, 2, 6]."
  • "Edge case: empty array — my code returns an empty list immediately."

Common Mistakes

  • Going silent for more than 30 seconds while debugging a bug
  • Skipping the brute force and jumping straight to optimal — interviewers want to see reasoning
  • Forgetting to state complexity at the end of every problem
  • Using variable names like x, y, tmp instead of min_price, left_product
  • Declaring done without tracing through at least one example

Interview Tips

  • Use a plain text editor with no autocomplete to simulate real interview tools (CoderPad, Google Docs)
  • Set a 50-minute hard timer and stop at the ring no matter what
  • If stuck, say "Let me think about this differently" instead of going silent
  • Always close with "Time complexity is O(...) and space is O(...) because..."
  • Record audio of every session and review for silent gaps and filler words like "um" and "like"

Key Takeaways

  • Week 1 trains communication habits on problems you already know cold — cognitive budget goes to narration, not algorithms
  • Solve 2 of 2 in under 45 minutes each before advancing to week 2
  • Always state brute force first, then explain the optimal approach and why you chose it
  • Narrate every block of code as you write it — never code silently
  • Trace through at least one example and one edge case before declaring done
  • A plain text editor with no autocomplete is the most realistic interview simulation tool
  • Record audio and review for silence gaps; 30 seconds of dead air costs scoring points
  • Signal quality — clarifying questions, edge case enumeration, continuous narration — matters as much as code correctness

Advertisement

Sanjeev Sharma

Written by

Sanjeev Sharma

Full Stack Engineer · E-mopro

Related reading