Grokking Algorithms: An illustrated…, Aditya Bhargava

You will find that this textbook uses a modular structure for flexible learning.