Skip to content
intermediate

Challenge: merge two sorted lists

Implement this from the stub. Hidden tests grade the behaviour you write, not the comments you leave.

Challenge: Merge Two Sorted Lists

interface ListNode {
  value: number
  next?: ListNode
}

export function mergeSorted(
  a: ListNode | undefined,
  b: ListNode | undefined
): ListNode | undefined {
  // Your implementation here
}
challenge — implement from scratchCtrl+↵ submits · Ctrl+Shift+↵ runsstarter code