Skip to content
Tagged articles

two-pointer

6 articles · Page 1 of 1
Rain's Path to Java Mastery
Rain's Path to Java Mastery
Oct 24, 2026 · Interview Experience

LeetCode 27 Remove Element: Two-Pointer In-Place Deletion, Interview Tips & 11 Pitfalls

This article thoroughly explains LeetCode 27 Remove Element using fast-slow and two-pointer swap approaches, covering loop invariants, boundary handling, 11 common pitfalls, 7 interview follow-up questions, and how this template applies to related problems like 26, 283, and 80.

Algorithm OptimizationLeetCode 27array manipulation
0 likes · 27 min read
LeetCode 27 Remove Element: Two-Pointer In-Place Deletion, Interview Tips & 11 Pitfalls
IT Services Circle
IT Services Circle
Feb 20, 2024 · Fundamentals

LeetCode 392: Determine if a String is a Subsequence Using the Two‑Pointer Technique

This article humorously references recent layoff memes before presenting a detailed tutorial on solving LeetCode problem 392—checking whether string s is a subsequence of t—using a two‑pointer algorithm, complete with step‑by‑step explanation, complexity analysis, visual illustrations, and reference implementations in C++, Java, and Python.

AlgorithmC++Java
0 likes · 8 min read
LeetCode 392: Determine if a String is a Subsequence Using the Two‑Pointer Technique
Nullbody Notes
Nullbody Notes
Nov 20, 2023 · Fundamentals

Counting Valid Triangles: Why Reverse Traversal Matters

The article explains how to count the number of valid triangles that can be formed from an integer array by first sorting the array and then using a reverse‑order two‑pointer technique, detailing each step and providing a complete Go implementation.

Algorithmsortingtriangles
0 likes · 3 min read
Counting Valid Triangles: Why Reverse Traversal Matters
NiuNiu MaTe
NiuNiu MaTe
Mar 15, 2022 · Fundamentals

Master the Container With Most Water: Two‑Pointer Solution Explained

This article presents a detailed walkthrough of the LeetCode "Container With Most Water" problem, covering the problem statement, a two‑pointer analysis, and a complete Java implementation, while highlighting key insights for efficiently maximizing water storage.

AlgorithmLeetCodecontainer-water
0 likes · 4 min read
Master the Container With Most Water: Two‑Pointer Solution Explained