-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
suggestionsPossible additions that would compliment the learning contentPossible additions that would compliment the learning content
Description
Gather a list of problems in LeetCode that can be considered AI related. Update this issue with the list that has been collected.
AI & LLM-Oriented LeetCode Problems
Curated LeetCode problems that reinforce algorithms and data structures used in modern generative AI/LLM systems: tokenization, sequence alignment, attention-style windows, retrieval, and sparse linear algebra.
Tokenization & language primitives
- 0208 - Implement Trie (Prefix Tree) — prefix vocabulary construction for token lookup/autocomplete. - My Solution
- 0212 - Word Search II — trie-guided backtracking similar to constrained decoding. - My Solution
- 0139 - Word Break — DP segmentation akin to validating token boundaries (BPE-like). My Solution
Sequence alignment & generation quality
- 0072 - Edit Distance — Levenshtein alignment for evaluation and decoding heuristics. My Solution
- 0115 - Distinct Subsequences — sequence likelihood/counting via DP. My Solution
- 1143 - Longest Common Subsequence — overlap/ROUGE-style similarity between sequences. My Solution
Attention windows & context management
- 0076 - Minimum Window Substring — minimal span covering required tokens (attention window intuition).
- 0340 - Longest Substring with At Most K Distinct Characters — fixed-size vocabulary within a context window. My Solution
Retrieval & similarity search
- 0692 - Top K Frequent Words — vocabulary curation and frequency-based ranking. My Solution
- 0658 - Find K Closest Elements — 1D k-NN building block for ANN-style retrieval. My Solution
- 0973 - K Closest Points to Origin — vector similarity search (Euclidean/cosine analog).
Sparse linear algebra for transformer kernels
- 0311 - Sparse Matrix Multiplication — efficient matmul on sparse activations/weights.
- 1570 - Dot Product of Two Sparse Vectors — embedding similarity with sparse representations.
Graph reasoning for semantic transitions
- 0127 - Word Ladder — shortest-path search between tokens/words using BFS.
Metadata
Metadata
Assignees
Labels
suggestionsPossible additions that would compliment the learning contentPossible additions that would compliment the learning content