General coding and algorithm practice