I think that it pays to implement the code yourself. Even though you think you understand a concept, you haven't tested it till you write the code. IMO, there is no better way to learn algorithms than implementing, tweaking, profiling and trying to visualize them.