Rabin-Karp algorithm

Rabin-Karp: Searching With Rolling Fingerprints

Most string searches work by comparing letters. Rabin-Karp takes a different road: it boils every chunk of text down to a single number, a fingerprint, and compares the numbers instead.…
heap vs sorted array

Heap vs Sorted Array for Priority Handling

Data structures · Priority queues · Performance An emergency room does not treat patients in the order they walk in. A nurse looks at each person and the sickest one…