AI & Models / macOS

Use AI Solver to review an approach

Compare your solution with a step-by-step demo and check the generated reasoning with tests.

The unlocked AI Solver panel in Coding before a demo starts.
The unlocked AI Solver panel in Coding before a demo starts. Select the image to enlarge.
  1. Make your own attempt first

    Write a baseline and run visible tests. If you are still deciding where to start, use a hint in Coaching.

    Example

    For Two Sum, write down the pair-scan approach and estimate what happens to the number of comparisons when the array doubles.

  2. Follow the solver demo

    Open AI Solver in the Inspector and start the demo. Read each step of its approach and use the available controls to pause when you want to compare reasoning.

    Example

    If the demo uses a map, note when it inserts the current value. Explain how checking first prevents matching an element to itself.

  3. Verify and compare

    Review the demo output and run relevant visible checks through Coding. Compare correctness and complexity with your attempt and the authored reference.

    Example

    Use [3, 3] with target 6 as a check. An implementation returning [0, 0] violates the distinct-index requirement even if its complexity claim is correct.

Check your work

You can explain one difference between approaches and verify it with a concrete test.

Try it yourself

After a demo, choose one claim it made about a tricky input and verify that claim in Coding. For Two Sum, try a case whose matching number appears at index 0.

What to look for
The authored contract and test result establish correctness. If the demo skips a stored index of zero, trace the lookup and explain why a membership check handles it.