Back to Browse

Recursion Subsequence Pattern | Include–Exclude Logic | Recursion Lecture 4

368 views
May 7, 2026
17:31

Lecture Resources https://github.com/Tiwarishashwat/Java-Plus-DSA-Placement-Course/tree/main/Lecture-098%20-%20Recursion%20on%20Subsequences Welcome to Lecture 4 of the Recursion Series, where we cover one of the most important recursion patterns — the Subsequence (Include–Exclude) Pattern. This pattern is the foundation of many advanced DSA problems such as: Subsets Combination Sum Permutations Backtracking problems What you will learn in this video: What is a subsequence? Why total subsequences = 2ⁿ Core include / exclude recursion logic Printing all subsequences Dry run & recursion tree visualization Counting total subsequences Subsequence problems with conditions Print subsequences starting with 'a' Count subsequences starting with 'a' How recursion forms a binary decision tree Time & space complexity analysis Common mistakes beginners make This lecture focuses on intuition building, not memorization — once you understand this pattern, a whole category of DSA problems becomes easy. This video is part of my Java + DSA course by ShashCode, designed for: DSA beginners College students Placement & interview preparation Mastering recursion & backtracking foundations 👉 Watch this lecture carefully — subsequence recursion is a gateway to advanced problem solving. Timestamp: 2:52 - Print all subsequence 9:08 - Print all subsequence starting with a char 11:13 - Count all subsequence 14:57 - Count all subsequence starting with a char 16:36 - Outro

Download

0 formats

No download links available.

Recursion Subsequence Pattern | Include–Exclude Logic | Recursion Lecture 4 | NatokHD