AI-assisted coding rounds

    An assistant wrote a solution that passes the examples. Find the input that breaks it and fix it.

    Two sum

    Before you edit, say out loud which input breaks it. Hidden tests run when you press Run, and they decide.

    Two sum

    Return the indices [i, j] (i < j) of the two numbers that add up to target. Each input has exactly one answer, and you may not use the same element twice.

    The assistant's draft passes the example. Find the input that breaks it, then fix it.

    Examples

    Input
    [[2,7,11,15],9]
    Output
    [0,1]
    JavaScript

    Runs in your browser.

    1 of 5
    All drills and your readiness