Skip to content
Noteshch-log
AboutSupport
< Back to notes

Browse 2 notes tagged hash table.

#hash table

LeetCode 1: Two Sum in TypeScript with a Map

Replace nested pair checks with a Map of earlier values and indices, then explain complement lookup, the loop invariant, and expected O(n) time.

#LeetCode#Blind 75#TypeScript+5
2026-08-30

LeetCode 217: Contains Duplicate in TypeScript with a Set

Compare a Set's size with the array length, or stop early during one scan, while explaining the Set solution's correctness and expected O(n) complexity.

#LeetCode#Blind 75#TypeScript+5
2026-08-29
Copyright ©2025-2026 hch-log.com. All rights reserved.
Written by Hung-Chih Hsueh ↗ · g3n-data ↗ · All links ↗
Support on Ko-fiAboutPrivacy Policy

Google services settings

Analytics and advertising stay off until you choose.

En中文