30 Days of LeetCode: Day 11 - Decoding the Longest Substring ChallengeToday, let's break down another LeetCode challenge that uses terms that might be unfamiliar or confusing. As always, understanding the problem is half the battle! The Original Challenge Here's how LeetCode presents the problem: Given a string s, fin...Jan 21, 2025·3 min read
30 Days of LeetCode: Day 7 - Rethinking Stock Trading ProfitToday's LeetCode challenge taught me a valuable lesson about how tracking state can be more effective than manipulating arrays. The problem seemed straightforward: find the maximum profit you could make by buying and selling a stock once. However, my...Jan 16, 2025·3 min read
30 Days of LeetCode: Day 6 - Rotating An ArrayToday's LeetCode challenge taught me the power of the modulo operator and how mathematical insights can turn a seemingly complex problem into an elegant solution. The real "aha" moment came when I started thinking about array rotation as a circular m...Jan 14, 2025·3 min read
30 Days of LeetCode: Day 5 - Understanding the Majority ElementToday's LeetCode challenge taught me an important lesson about problem-solving: sometimes understanding why a solution works is more valuable than just knowing how to code it. Like many developers, I initially jumped into thinking about implementatio...Jan 14, 2025·2 min read
30 Days of LeetCode: Day 4 - Valid Parentheses String Locking PatternWhen I first encountered the "Check if a Parentheses String Can Be Valid" challenge, I fell into a common trap that many developers encounter: trying to solve for creation when the problem only asked for validation. This experience taught me a valuab...Jan 13, 2025·3 min read
30 Days of LeetCode: Day 3 - The Power of a Single PointerToday's LeetCode challenge taught me a valuable lesson about the elegance of simple solutions. The problem seemed complex at first: remove duplicates from a sorted array while allowing each element to appear at most twice. But the solution hinged on ...Jan 12, 2025·3 min read
30 Days of LeetCode: Day 2 - Modify An Array in PlaceToday's LeetCode challenge- an “Array Transformation" algorithm- taught me an important lesson about array manipulation in JavaScript. The problem seemed straightforward: remove all occurrences of a specific value from an array. However, I discovered...Jan 11, 2025·3 min read