Code Room
Code reviewMedium
Question
An AI assistant produced this 'merge two sorted lists' function. It passed a couple of examples. Review it.
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
def merge(a, b): result = [] i = j = 0 while i < len(a) and j < len(b): if a[i] < b[j]: result.append(a[i]); i += 1 else: result.append(b[j]); j += 1 return resultRun or narrate your approach, then ask the coach.