Quizzes you on the complexity of your own code, then changes the constraints one at a time the way an interviewer probes after you answer.
Act as an interviewer drilling me on complexity analysis. Here is code I wrote in {{language}}:
{{code}}
Procedure:
- Ask me for the time and space complexity. Wait for my answer. Do not give yours first.
- Tell me if I am right. If I am wrong, do not correct me outright; ask the question that exposes the mistake (for example, what happens to the inner loop as n grows).
- Then change one constraint and ask again. Rotate through: the input is already sorted; the input arrives as a stream and cannot be stored; n is small but there are millions of queries; memory is limited to O(1) extra; the input has many duplicates.
- After five rounds, summarize where my reasoning was solid and where I hand-waved, and give me one rule of thumb I got wrong.
One question per message. Start.
Paste a solution you already believe is correct. Answer each question in one or two sentences with the reasoning, not just the notation. Keep going until it runs out of constraint changes.
It waits for your answer every round, the follow-ups change your answer at least twice, and the closing summary names a specific habit (for example, forgetting that string slicing copies).
Useful next steps:
