Shuffling a List

Problem: Given a singly linked list, rearrange it so that every possibility has an equal chance of occurring (assuming access to a perfect random number generator)

Goal: time and space

Approach with Divide and Conquer

Subproblem: Given two shuffled linked lists, create a combined shuffled linked list

Solution: Choose first element from with probability . Choose first element with with probability . Repeat.