Useful algorithms in graph theory, array manipulations, and search