Nice step-by-step tutorial on how to design, implement and test a STD-like algorithm. As usual, getting the right pass-by-something is always tricky.