coding practice to algorithms