Implement Prototype(readings []Reading) Summary using direct scans, then Solve in one pass. Only readings with Valid=true participate. Summary contains Count, Total, and optional Minimum/Maximum pointers. Empty or all-invalid input returns Count/Total zero and nil extrema. A valid zero remains pointer zero. Signed values and ties are valid; all sums fit int. Preserve input and return independent extrema pointers. Both stages return identical results; final uses O(n) time and O(1) summary state. The provided structs specify the API.
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.