My solutions to some algorithm problems