Checkpoint: midpoint mock round
90 / 170Checkpoint: midpoint mock roundLesson 2 of 5About 47 min
A warm-up on lists, then a tree problem with two things to track at once. 45 minutes.
Two problems, 45 minutes for both. Aim to spend around 15 on the first. Neither has a lesson above it and neither is a NeetCode 150 problem, so nothing here is something you have seen.
Reverse only the nodes between two 1-indexed positions, leaving the rest of the list alone. You have reversed a whole list and reversed fixed-size groups; this is the piece in between. Think about which references you need to hold before you start rewiring.
Two nodes are cousins when they sit at the same depth and do not share a parent. The tree here has any number of children per node rather than exactly two. Decide what each node needs to know about the path above it before you pick a traversal.