MKS algorithms week 1