Practice ยท 2 of 3
Divergence Detector
Write diverged(commits, a, b) returning true when NEITHER commit is an ancestor of the other (their histories have split). Use your reachability logic conceptually: a is an ancestor of b (or equal) โ false; same for b over a; otherwise true.
Difficulty: intermediate
Press Submit to check your solution.
Back to lesson: Practice: History as Data โ Practice