𝗗𝗮𝘆 𝟳𝟬/𝟭𝟬𝟬 — 𝟳𝟬% 𝗖𝗢𝗠𝗣𝗟𝗘𝗧𝗘 🎉 70 days. 70 problems. 70% done. 𝗜 𝗱𝗶𝗱𝗻'𝘁 𝗾𝘂𝗶𝘁. 𝗧𝗼𝗱𝗮𝘆'𝘀 𝗣𝗿𝗼𝗯𝗹𝗲𝗺: ✅ #𝟭𝟵𝟭𝟬: Remove All Occurrences of a Substring (Medium) 𝗧𝗵𝗲 𝗣𝗿𝗼𝗯𝗹𝗲𝗺: Remove all occurrences of a substring from a string. Keep removing until no more exist. Example: s = "daabcbaabcbc", part = "abc" → "dab" Stack behavior again. Build string character by character. Check the end for pattern matches. Remove when found. 𝗠𝘆 𝗦𝗼𝗹𝘂𝘁𝗶𝗼𝗻: StringBuilder as stack. For each character: Append it Check if the last m characters match the pattern If yes, delete them Continue Time: O(n × m), Space: O(n) 𝗪𝗵𝗮𝘁 𝟳𝟬 𝗗𝗮𝘆𝘀 𝗧𝗮𝘂𝗴𝗵𝘁 𝗠𝗲: 𝗗𝗮𝘆 𝟭: Basic arrays felt hard 𝗗𝗮𝘆 𝟯𝟬: Started linked lists, struggled 𝗗𝗮𝘆 𝟱𝟬: Linked lists = second nature 𝗗𝗮𝘆 𝟲𝟬: Stacks, queues, patterns everywhere 𝗗𝗮𝘆 𝟳𝟬: Combining patterns feels natural The progression is real. The compound effect is real. 𝗧𝗵𝗲 𝗧𝗿𝘂𝘁𝗵: 70 days ago, I wasn't sure I could finish this. Some days I didn't want to code. Some days felt pointless. But I showed up anyway. 𝗧𝗵𝗮𝘁'𝘀 𝘁𝗵𝗲 𝘀𝗸𝗶𝗹𝗹 𝘁𝗵𝗮𝘁 𝗺𝗮𝘁𝘁𝗲𝗿𝘀—not talent, not motivation, but showing up when you don't feel like it. 𝗖𝗼𝗱𝗲: https://lnkd.in/gd-QRcxU 𝟳𝟬 𝗱𝗼𝘄𝗻. 𝟯𝟬 𝘁𝗼 𝗴𝗼. 70% complete. The finish line is close. Let's bring this home. 𝗗𝗮𝘆 𝟳𝟬/𝟭𝟬𝟬 ✅ #100DaysOfCode #LeetCode #70DayMilestone #Consistency #Stack #Algorithms #CodingChallenge #Programming #Java #NeverQuit #GrowthMindset #70Percent #AlmostThere

To view or add a comment, sign in

Explore content categories