Subset II LeetCode Solution with Recursion and Backtracking

Day 28 of #100DaysOfCode 💻 Today’s focus: Subsets II (LeetCode 90) Building on yesterday’s Subset Sum (Problem 1), today I explored how the same recursion pattern works when duplicates are involved. 📌 What I focused on: At each step → either pick the element or skip it (same as Subset 1) Sorting the array to handle duplicates Skipping repeated elements at the same recursion level 💡 Realization: Subset II is not a completely new problem—it’s an extension of Subset 1 with an extra constraint. Understanding the base pattern made it much easier to adapt and solve this one. Felt good to see how concepts connect step by step. Still getting more comfortable with recursion and backtracking 🚀 #LeetCode #DSA #Recursion #Backtracking #CodingJourney

  • graphical user interface, text

To view or add a comment, sign in

Explore content categories