Introduction to Algorithms, Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein, 2022 (The MIT Press) - This textbook provides a comprehensive theoretical foundation for heaps, priority queues, and various selection algorithms, including the principles behind finding the k-th smallest/largest elements.
heapq - Heap queue algorithm, Python Software Foundation, 2024 (Python Software Foundation) - Official documentation for Python's heapq module, offering practical implementation details and examples for efficient heap-based solutions in Python.
CS161: Design and Analysis of Algorithms, Matthew Sotoudeh, 2025 (Stanford University) - An authoritative academic course covering the design and analysis of algorithms, including detailed discussions on heaps, priority queues, and their application in selection problems.
Mining of Massive Datasets, Jure Leskovec, Anand Rajaraman, Jeff Ullman, 2020 (Cambridge University Press) - Provides context for using efficient data structures like heaps for selection problems in large-scale data processing and streaming algorithms, which is highly relevant to machine learning with big data.