Introduction to hashing-based two-pass algorithms