algorithms for interview or practices