Implement Prototype(values,blocked []int) []int by filtering, then Solve with the same value result. Preserve both slices. Also implement Detach(head *Node, blocked map[int]bool) *Node in both stages. Relink existing nodes only; surviving pointers and order must be identical, result acyclic and tail nil. Map keys with true values are blocked; do not mutate it. Nil head or complete removal returns nil; a temporary sentinel is allowed.

Edit exercise.go; retain the public types and signatures. prototype and final are separate stages. The executable tests recover panics as failures, report named checks, and exit nonzero on any failure. A successful run must execute at least one check. Tests use logical time or explicit synchronization where relevant.

Drag or use the arrow keys to resize. Home collapses the question; End collapses the editor. Enter or double-click resets the split.
Loading editor…
No results yet.

Complete the starter code, then run the checks.
Results and errors will appear here.