Procedures described in Cormen, T. H. (2013). Algorithms Unlocked. MIT Press.