Implement Prototype(values []int,commands []Command) ([]*int,error) by copying and scanning; Solve uses a segment tree. Command set uses A=index, B=replacement; min uses A=left, B=exclusive right. Return query results only in order; empty range returns nil optional minimum. Signed values valid. Unknown op, invalid update index, or range failing 0<=left<=right<=n returns error. Preserve both inputs including on error. Each optional result must remain independent of later updates.
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.
Complete the starter code, then run the checks.
Results and errors will appear here.