- 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.
- LeetCode 64 – Minimum Path Sum
Same table, one operator changed, and with it the entire class of problem. Building the grid where the greedy loses instead of just claiming it does, why a missing neighbour is infinity here when it was zero in the counting version, and why Integer.MAX_VALUE as the sentinel overflows into a path through the wall.