Java DSA Day 38: Strings & Two-Pointer Technique

🚀 Day 38 / 180 – DSA with Java 🚀 📘 Topic Covered: Strings & Two-Pointer Technique 🧩 Problem Solved: Is Subsequence Problem: Given two strings s and t, check whether s is a subsequence of t. Approach: Used two pointers to traverse both strings. Moved the pointer in s only when characters matched, and always moved the pointer in t, ensuring order is maintained. Key Learning: ✔️ Applying two-pointer technique on strings ✔️ Understanding subsequence vs substring ✔️ Writing clean and efficient O(n) solutions If you’re also preparing for DSA, let’s connect and learn together 🤝 #DSA #Java #180DaysOfCode #LearningInPublic #Strings #ProblemSolving #Consistency

  • No alternative text description for this image

To view or add a comment, sign in

Explore content categories