precompute k
Merge branch 'master' of https://github.com/cschubiner/CS166_Homework