Day 17: String & Array Problems in DSA Journey

🚀 Day 17/100 – DSA Journey Taking a slight shift from Linked Lists to string & array-based problems today ✨ 🔹 Problems Solved: 1. Find Words Containing Character 2. Length of Last Word 💡 Key Learnings: 👉 Problem 1: Find Words Containing Character Iterate through the array of words Check if each word includes the given character Store indices of matching words 👉 Key Insight: Simple traversal + condition check can solve efficiently ✅ O(n * m) Time (n = words, m = avg word length) ✅ O(k) Space (for result) 👉 Problem 2: Length of Last Word Traverse string from the end Skip trailing spaces Count characters until next space 👉 Key Insight: Reverse traversal avoids unnecessary splits ✅ O(n) Time ✅ O(1) Space 🔥 What I learned today: Not every problem needs complex data structures — sometimes clean string handling and traversal logic is enough. Switching between topics is helping me think more flexibly 🧠 Day 17 done ✅ Staying consistent! 💬 Quick question: Do you prefer solving string problems or linked list problems? #100DaysOfDSA #buildinpublic #developersoflinkedin #codinginpublic #leetcodejourney #softwareengineerlife #dailylearning #codingpractice #devcommunity #programminglife #techcareers #jobready #growthmindset

To view or add a comment, sign in

Explore content categories