← All videos

Engineering video

14:35 · 30 July 2024

Live Coding Interview JavaScript (Senior Level - Recursion)

Chapters 6 sections

  1. 0:00Introduction to the Interview Problem
  2. 1:06Visualizing and Drawing the Data Structure
  3. 2:17Planning Base Cases and Pseudo Code
  4. 3:29Implementing the Base Case and Simple Iteration

Key concepts in this video:

1. Problem Visualization and Drawing

Drawing out the problem structure helps visualize nested data and prevents freezing under pressure during an interview.

Watch section from 1:06 →

2. Solving the Base Case

Identifying and solving the simplest case first, such as an empty array or single person with no children, helps break coder's block and builds confidence.

Watch section from 2:24 →

3. Handling Iteration and Basic Cases

Iterating through the family array using standard for-loops to handle members without children before tackling complex recursive logic.

Watch section from 4:07 →

4. Recursion and Backtracking

Reusing the count function on child arrays to calculate descendants recursively and backing track to aggregate sums into parent names.

Watch section from 5:47 →

5. Senior JavaScript Interview Preparation Strategy

Combining JavaScript fundamentals, proficiency in for/while loops, and recursion practice with structured problem decomposition instead of relying solely on months of LeetCode.

Watch section from 10:53 →

Transcript

This was a real interview problem one of our AMTs got a few weeks ago. They told him this is going to be a react interview, but just before jumping in, he realized the interview was more of a algorithms and data structures problem. In this video, button will show you a step-by-step process you can use to solve this kind of live coding interview problems. So, this is exactly what our our student was presented with and for a senior react developer position.