- LeetCode 69 – Sqrt(x)
A binary search problem that never mentions a sorted array — binary search is for any monotonic predicate, and spotting one with no array in sight is the lesson. Plus the overflow that is really the point: mid * mid goes negative near MAX_VALUE and the search silently walks the wrong way.
- MySQL – Full-Text Search
Searching text properly instead of with `LIKE '%...%'`. Creating a FULLTEXT index, MATCH ... AGAINST in natural language mode, boolean mode with `+`, `-` and `*`, relevance scores and ordering by them, the default minimum word length and stopword list that make short searches return nothing, and where full-text search stops being enough and Elasticsearch starts.
- MongoDB – Documents and BSON Types
Documents, the BSON type system, _id and ObjectId — and the string-versus-ObjectId mismatch that silently breaks joins.
- LeetCode 68 – Text Justification
No algorithmic difficulty and one of the highest failure rates on the list, because the spacing rules have four interacting cases and each is a silent off-by-one. Split packing from padding before typing, collapse the four cases into two, and remember the single-word line where gaps would be zero.
- MySQL – JSON Columns
MySQL's native JSON type, which is not just a string. Storing and validating JSON, reading values with `->` and `->>`, JSON_EXTRACT, JSON_UNQUOTE, JSON_SET, JSON_ARRAY and JSON_OBJECT, JSON_TABLE for turning a document into rows, indexing a JSON path with a generated column — the only way to index one — and the question worth asking first: should this be a column instead?