← Course home

Python reference · Reference

Strings

Search, index, and compress text with tries, pattern matching, hashes, and suffix arrays.

ReferenceAbout 2 min

This page lists the library modules for Strings. The lesson is String search algorithms.

This page is the module index for strings.

  • strings/algorithms.py — trie, KMP, Rabin-Karp, inverted index, run-length encoding, suffix array with LCP.

Focused lessons

Industry

A working engineer answers which documents contain a term with an inverted index. PostgreSQL documents GIN indexes as inverted indexes: a separate entry for each component value, so a query can test whether that value is present. InvertedIndex in this module is that map from a term to its posting list.

Implementation and tests Optional reference

Library code 1

  • bitsandbytes.strings.algorithms

Use these references to compare the explanation with repository code and tests. A test link means it imports a lesson symbol; it does not by itself claim complete behavior coverage.