AI Features

Practice: Sorted Union

Practice the local references technique by writing functions on linked lists.

We'll cover the following...

Problem statement

The input consists of two lists in sorted order, and we must construct a new list to represent the reunion of the two lists. The reunion must maintain the sorted order. The two input lists must remain unchanged.

We can only traverse each list at most once. That is, the complexity should be O(n)O(n) ...