Introduction to algorithms examples in C and Python