Day 84 — REVIEW — Revisit hardest
Coding problem
| Problem | REVIEW — Revisit hardest |
| LeetCode ID(s) | — |
| Difficulty | Mixed |
| Pattern | Review |
| Company tags | — |
| Suggested time | 30m |
Solution outline (coding)
- Open your “hardest” list from prior weeks; pick top 2 by dread.
- Solve one completely, skim solution for the other.
- Add a one-page cheat sheet for those patterns only.
Time complexity: Varies.
Space complexity: Varies.
Show Python solution
class ReviewDay:
"""Practice / review: REVIEW — Revisit hardest."""
def practice_plan(self):
return [
"Pick 2–3 problems from this phase; re-solve timed without notes.",
"For each: pattern name, time/space complexity, one alternative approach.",
]
# Input: (your choice of problems from this week or phase)
# Output: a short list of gaps to drill before the next sessionSQL interview practice
1. Interview question
Companies / track: Review / mixed (see weekly theme)
This is a review / mixed day. Expect SQL that blends data quality, funnels, and metric definitions—the same mix you see across consumer tech and ads analytics.
What you are asked to write (SQL prompt):
Review / mixed week — use the same tables and deliverables as in a standard onsite SQL round.
Collect hardest unsolved SQL questions in a table and design meta-queries that classify them by pattern and typical failure mode.
Tables implied by the prompt:
- Infer schemas from the prompt and state them before coding.
2. Solution outline
- Clarify out loud: result grain (one row per what?), join keys, time zone, and any
ORDER BY/LIMIT/ tie-breakers. - Map Review to SQL: say the relational equivalent (e.g. hash map →
GROUP BY+ key; two pointers → ordered window + filter). - Structure: CTEs (
WITH) — one step per CTE; validate on a tiny slice (counts, nulls, duplicates).
Show SQL solution (BigQuery)
Main query
SELECT difficulty, COUNT(*) FROM unsolved_sql_bank GROUP BY difficulty;