Skip to content

All 10

LeetCode 128 - Longest Consecutive Sequence

From O(n log n) sorting to an O(n) hash set solution — finding the longest consecutive sequence by identifying sequence heads.

LeetCode 036 - Valid Sudoku

Validate a 9×9 Sudoku board by checking rows, columns, and 3×3 sub-boxes — from brute-force to a clean one-pass hash set solution.

Vietnamese Diary 0409 — Frieren Ch.82

Learning Vietnamese through Frieren Beyond Journey's End Chapter 82 — Sino-Vietnamese vocabulary, colloquial phrases, and grammar notes.

LeetCode 238 - Products of Array Except Self

Calculate the product of all elements except self without division — using prefix and suffix products to achieve O(n) time.

LeetCode 271 - Encode and Decode Strings

Design a serialization protocol to encode a list of strings into a single string and decode it back — a problem rooted in real network communication design.

LeetCode 347 - Top K Frequent Elements

Find the k most frequent elements — from brute force to an optimal O(n) bucket sort solution.

LeetCode 049 - Group Anagrams

Group strings that are anagrams of each other — from brute-force sorting to an optimal character-count hash map.

LeetCode 001 - Two Sum

Find two indices that sum to a target — from brute force to one-pass hash table, three solutions compared.

LeetCode 217 - Contains Duplicate

Detect duplicates in an array using a Set — two solutions compared by time and space complexity.

LeetCode 242 - Valid Anagram

Use a hash map to check whether two strings are anagrams of each other in O(N) time.