{"id":"first-occurrence-hashmap-pattern","text":"The first-occurrence hash map (record earliest index per key, compute distance on later hits) is a recurring O(n) pattern across the repo, used in largest-substring-between-two-equal-characters, contains-duplicate-ii, check-distances-between-same-letters, and degree-of-an-array.","truth_value":"IN","source":"entries/2026/06/06/largest-substring-between-two-equal-characters-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"first-occurrence-hashmap-pattern","truth_value":"IN","reason":"premise"}]}}