LeetCode 231: Power of Two (Bit Trick O(1) ACERS Guide)

Subtitle / Summary A classic bit-manipulation template: determine if a number is a power of two in O(1). This ACERS guide covers the core insight, practical uses, and runnable multi-language implementations. Reading time: 8–12 min Tags: bit manipulation, binary, math SEO keywords: Power of Two, bit manipulation, binary, O(1), LeetCode 231 Meta description: O(1) power-of-two check using bit tricks, with engineering scenarios and multi-language code. A — Algorithm Problem Restatement Given an integer n, determine whether it is a power of two. Return true if it is; otherwise, return false. ...

January 21, 2026 · 6 min · map[name:Jeanphilo]

LeetCode 1456: Maximum Number of Vowels in a Substring of Given Length (ACERS Guide)

Subtitle / Summary A standard fixed-window counting problem. This ACERS guide explains the sliding-window model, engineering use cases, and runnable multi-language solutions. Reading time: 10–12 min Tags: sliding window, string, fixed window SEO keywords: Maximum Number of Vowels, Sliding Window, Fixed Window Meta description: Fixed-window sliding count for maximum vowels with engineering applications. A — Algorithm Problem Restatement Given a string s and an integer k, return the maximum number of vowels in any substring of length k. ...

January 20, 2026 · 7 min · map[name:Jeanphilo]

LeetCode 239: Sliding Window Maximum (Monotonic Queue ACERS Guide)

Title LeetCode 239: Sliding Window Maximum (Monotonic Queue ACERS Guide) Subtitle / Summary Sliding Window Maximum is the classic combo of sliding window + monotonic queue. This article follows the ACERS template with reusable engineering patterns and multi-language implementations. Estimated reading time: 12–15 minutes Tags: sliding window, monotonic queue, array SEO keywords: Sliding Window Maximum, monotonic queue, deque, O(n) Meta description: Monotonic-queue solution for Sliding Window Maximum with engineering practice and multi-language implementations. A — Algorithm (Problem & Algorithm) Problem Restatement Given an integer array nums and a window size k, a sliding window moves from left to right. Each move shifts the window by one. Return the maximum for each window. ...

January 19, 2026 · 8 min · map[name:Jeanphilo]

What Is size_t? Why C++ Loops Prefer size_t Over int

What Is size_t? Why C++ Loops Prefer size_t Over int Subtitle / Abstract When you iterate containers with a for loop, size_t is often safer and closer to the intended meaning than int. This post uses the ACERS structure to explain what size_t is, why it is used, the common pitfalls, and practical patterns for production C++. Meta Reading time: 8-10 minutes Tags: C++, size_t, type system, loops, STL SEO keywords: size_t usage, size_t vs int, C++ loop initialization, size_t underflow Meta description: Explain size_t and why loops often use it, with safe patterns and engineering scenarios. Target readers C++ beginners who are new to size_t, sizeof, and container size() return types Mid-level engineers who have seen -Wsign-compare warnings or unsigned underflow bugs Engineers writing cross-platform or high-performance C++ Background / Motivation In C++ code, you often see loops like: ...

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

LeetCode 1512: Number of Good Pairs (Hash Counting ACERS Guide)

Subtitle / Abstract A basic counting problem: use frequency + combinations to drop O(n^2) to O(n). Includes engineering use cases and portable implementations. Reading time: 8-10 minutes Tags: hash-table, counting, array SEO keywords: Good Pairs, hash map, frequency Meta description: Hash counting solution for Good Pairs with complexity and code. Target readers Beginners learning hash tables and counting Engineers who want to map interview patterns to real stats tasks Interview prep for basic counting models Background / Motivation Counting equal pairs is a classic problem. A double loop is O(n^2). With frequency counting, you can solve it in linear time and scale to large data. ...

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

XOR and RC4: From Principles to Go Practice (with Safer Alternatives)

XOR and RC4: From Principles to Go Practice (with Safer Alternatives) Subtitle / Abstract Use minimal math to explain XOR and RC4, provide runnable Go examples, and clarify why RC4 is considered insecure with recommended alternatives. Target readers Backend engineers reading legacy RC4 code Beginners who confuse encoding and encryption Intermediate developers building a stream-cipher mental model Background / Motivation Many systems still contain RC4 or custom decryption logic. Common mistakes include treating Base64 as encryption and ignoring integrity checks. Understanding XOR and RC4 helps you evaluate security correctly and avoid copying outdated designs into new systems. ...

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

Sorting Series (Final): Practical Selection - Choose by Scale, Stability, Memory, Distribution

Practical selection guide: decision tables by scale/distribution/stability/memory, engineering scenarios, test checklist, and common pitfalls to apply the series.

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

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]