Linked List Problems
Stanford CS Education Library: A quick review of linked list basics followed
by 18 linked list problems, basic through advanced, with solution code
in C/C++. Nobody really uses linked lists any more, so why bother
with these problems? Linked lists are a superb source of complex practice
problems. Link list problems are simple to define, yet can have complicated,
pointer-intensive solutions (which is why they are often used on exams
and in interviews). If you are serious about your pointer/algorithm skills,
there's no substitute for practice and this is the place to start.
For a few problems, multiple solutions are presented, such as iteration
vs. recursion or dummy node vs. reference pointer. The problems are: Count,
GetNth, DeleteList, Pop, InsertNth, SortedInsert, InsertSort, Append, FrontBackSplit,
RemoveDuplicates, MoveNode, AlternatingSplit, ShuffleMerge, SortedMerge,
SortedIntersect, Reverse, and RecursiveReverse.
(revised Jan, 2002)
Up to the