Posts
All the articles I've posted.
-
LeetCode 33 Search in Rotated Sorted Array
Solutions for LeetCode 33, medium, tags: array, binary search.
-
System Design - How Database Query Optimization Works
How database query optimizers work: parsing SQL into trees, generating candidate plans, cost estimation, join ordering with dynamic programming and genetic algorithms, and a source code walkthrough of the PostgreSQL optimizer.
-
AI/ML - How the Transformer Attention Mechanism Works
How the Transformer attention mechanism works: intuition behind queries/keys/values, scaled dot-product attention, multi-head attention, positional encoding, and a source code walkthrough from PyTorch and the original paper.
-
LeetCode 230 Kth Smallest Element in a BST
Solutions for LeetCode 230, medium, tags: tree, depth-first search, binary search tree, binary tree.
-
LeetCode 347 Top K Frequent Elements
Solutions for LeetCode 347, medium, tags: array, hash table, divide and conquer, sorting, heap, bucket sort, counting, quickselect.
-
System Design - How the TLS Handshake Works
How TLS (Transport Layer Security) works: the handshake protocol, certificate verification, key exchange with Diffie-Hellman, symmetric encryption, TLS 1.2 vs 1.3, and a source code walkthrough from Go's crypto/tls package.