Welcome to AlgoYogi!
🚀 Start Your Smart Coding Prep at 👉 https://algoyogi.io
We solve LeetCode 392: Is Subsequence using Python and a clean two-pointer scan.
Goal: check if string s is a subsequence of string t by walking both strings left to right and matching characters in order.
👉 Problem Link: https://leetcode.com/problems/is-subsequence/
---
### ⏱ Timestamps
0:00 Introduction
0:20 Problem Statement
1:00 Two-Pointer Approach
6:30 Python Code Walkthrough
8:30 Time and Space Complexity
---
### 💡 Why Watch?
- Elegant O(n) time, O(1) space check
- Simple pointer movement and early exit when all s is matched
- Notes on batching many queries with preprocessed positions for t
#LeetCode #IsSubsequence #Python #AlgoYogi #TwoPointers #Strings
Download
0 formats
No download links available.
LeetCode 392 | Is Subsequence | Python Two-Pointers in One Pass | AlgoYogi | NatokHD