Tag

Two-pointer

0 views collected around this technical thread.

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.

CJavaLeetCode
0 likes · 8 min read
LeetCode 392: Determine if a String is a Subsequence Using the Two‑Pointer Technique
IT Services Circle
IT Services Circle
Nov 21, 2023 · Fundamentals

LeetCode 42 – Trapping Rain Water: Problem Overview and Three O(n) Solution Techniques (Two‑Pointer, Prefix‑Max, Monotonic Stack)

This article explains LeetCode problem 42 “Trapping Rain Water”, detailing the problem statement, example, and three efficient O(n) solution approaches—two‑pointer, prefix‑max arrays, and a monotonic stack—each accompanied by complete Java implementations and analysis of their logic.

JavaLeetCodeMonotonic Stack
0 likes · 7 min read
LeetCode 42 – Trapping Rain Water: Problem Overview and Three O(n) Solution Techniques (Two‑Pointer, Prefix‑Max, Monotonic Stack)