Chances are, if you were able to program the algorithms required to solve the problems, you understood them well enough or more than enough to pass the course.
Definitely not the case for me. I had as many books and websites as I needed while creating those programs, but did not have them available during tests.
What happens when one kid writes a quadratic solver and gives it to half the class?