Introduction to algorithms - Cormen, Thomas H. and others (Massachusetts, 2022)