#Program code.
you are looking for a book on Algorithms. I personally use
"Algorithms in C" by Sedgewick, but he had one that was generic as
well. Also a version for C++.
It has tons of diagrams showing how these programs work. I think
it is what you are looking for.