A few algorithm exercises