Do Not Let AI Drive You: Keep the Ability to Build Independently

How to avoid copy-paste dependence when using AI for coding: Feynman technique, deliberate practice, retrieval practice, and a practical self-check workflow.

December 8, 2025 · 3 min · map[name:Jeanphilo]

Emmet-Vim Speed Guide: Write HTML/CSS with Abbreviations

Practical Emmet notes for Vim/Neovim users: install, key mappings, runnable examples, validation checklist, and common pitfalls to 3x your page and component speed.

December 8, 2025 · 6 min · map[name:Jeanphilo]

Sorting Series (8): TimSort and Introsort - Engineering Patterns Behind Built-in Sorts

Explain Python/Java TimSort and C++ std::sort Introsort: triggers, stability, complexity, trade-offs, with skeletons and selection guidance.

December 8, 2025 · 5 min · map[name:Jeanphilo]

Sorting Series (7): Non-Comparison Sorting - Counting, Bucket, Radix and the Range/Digit Tradeoff

Explain prerequisites, complexity, implementation details, and pitfalls of non-comparison sorts with multilingual examples for counting, bucket, and radix.

December 7, 2025 · 5 min · map[name:Jeanphilo]

Svelte Button Configuration Guide: States, Styles, and Accessibility

Build reusable buttons in Svelte: dynamic classes, optional chaining and nullish coalescing, safe defaults, state-driven styles, accessibility, testing, and common pitfalls.

December 7, 2025 · 4 min · map[name:Jeanphilo]

Sorting Series (6): Heap Sort - In-place O(n log n) with Worst-Case Guarantees

Explain heap sort principles, complexity, and engineering scenarios; compare with quick/merge; include multilingual implementations and top-k examples.

December 6, 2025 · 5 min · map[name:Jeanphilo]

Sorting Series (5): Quick Sort - Pivot Strategy, Tail Recursion, Engineering Practice

Comprehensive quicksort guide: pivot selection, three-way partitioning, tail recursion optimization, hybrid sorting practices, with multilingual implementations and engineering guidance.

December 5, 2025 · 8 min · map[name:Jeanphilo]

LeetCode 1: Two Sum (Hash Map ACERS Summary)

LeetCode 1: Two Sum Summary Find two indices such that nums[i] + nums[j] = target. Use a hash map for O(n) time. Approach Iterate and store value -> index. For each number x, check if target - x exists. Complexity Time: O(n) Space: O(n) Python reference implementation def two_sum(nums, target): seen = {} for i, x in enumerate(nums): y = target - x if y in seen: return [seen[y], i] seen[x] = i

December 4, 2025 · 1 min · map[name:Jeanphilo]

LeetCode 2300: Successful Pairs of Spells and Potions

LeetCode 2300: Successful Pairs of Spells and Potions Summary For each spell, count how many potions make spell * potion >= success. Sort potions and binary search the threshold. Approach Sort potions. For each spell, compute need = ceil(success / spell). Use binary search to find the first potion >= need. Complexity Time: O(n log n) Space: O(1) extra (or O(n) if sorting a copy) Python reference implementation import bisect import math def successful_pairs(spells, potions, success): potions = sorted(potions) n = len(potions) res = [] for s in spells: need = (success + s - 1) // s idx = bisect.bisect_left(potions, need) res.append(n - idx) return res

December 4, 2025 · 1 min · map[name:Jeanphilo]

LeetCode 2379: Minimum Recolors to Get K Consecutive Black Blocks

LeetCode 2379: Minimum Recolors to Get K Consecutive Black Blocks Summary Given a string of ‘B’ and ‘W’, find the minimum recolors to make a substring of length k all black. Approach Use a sliding window of length k and count the number of whites in the window. The minimum whites across all windows is the answer. Complexity Time: O(n) Space: O(1) Python reference implementation def minimum_recolors(blocks, k): whites = sum(1 for c in blocks[:k] if c == 'W') ans = whites for i in range(k, len(blocks)): if blocks[i-k] == 'W': whites -= 1 if blocks[i] == 'W': whites += 1 ans = min(ans, whites) return ans

December 4, 2025 · 1 min · map[name:Jeanphilo]