some practice with algorithms

to prepare for interviews