Examples from book Robert Sedgewick and Kevin Wayne - Algorithms, 4th edition [Princeton University]