- LeetCode 67 – Add Binary
Looks like string manipulation, is really about carries — and the parse-to-integer answer everyone writes first is exactly what the 10,000-character constraint rules out. Why the carry belongs in the loop condition, why you build and reverse instead of prepending, and XOR and AND as sum-without-carry and carry.
- LeetCode 65 – Valid Number
Not an algorithms problem at all — it tests whether you can pin down an ambiguous spec with questions and turn it into code that does not sprawl. Three flags and one pass beat the finite-state machine, and resetting seenDigit on e is the single line that rejects 1e while accepting 3e+7.
- MySQL – DATE_FORMAT and Date Functions
Formatting and calculating with dates. DATE_FORMAT and the specifier table you will keep coming back to, NOW() versus CURDATE() versus SYSDATE(), DATE_ADD and DATE_SUB, DATEDIFF and TIMESTAMPDIFF, EXTRACT, LAST_DAY, STR_TO_DATE for parsing, and why grouping by DATE_FORMAT(created_at, '%Y-%m') is convenient and quietly prevents the index on created_at from being used.
- MySQL – Built-in Functions
The functions you reach for weekly. String work with CONCAT, CONCAT_WS, SUBSTRING, TRIM, REPLACE, UPPER and LOWER, LPAD — the one the schema uses to backfill UUIDs — numbers with ROUND, CEIL, FLOOR, ABS and MOD, why ROUND on a DECIMAL and on a FLOAT do not agree, GROUP_CONCAT for rolling a group into one string, and UUID() and RAND().
- Designing a Chat System
Real-time messaging end to end. Polling, long polling, server-sent events and WebSockets — what each costs and when each is right; the connection registry that lets one server find a user connected to another; message ordering when clocks disagree; storage that supports "load older messages" cheaply; group chat fan-out and the point at which it stops working; presence, delivery receipts and offline delivery.