Day 3 | DSA + LeetCode Practice 🚀 Continuing my #100DaysOfCode challenge with a focus on understanding problem-solving patterns and thinking step by step. ✅ Problems Solved Today: Leetcode #9 🔹Palindrome Number Problem: Given an integer x, determine whether it is a palindrome. • Methodology Applied: Mathematical reasoning / Two-pointer logic • Approach: Avoided converting the number into a string Reversed half of the number mathematically Compared the reversed half with the remaining part 📌 Key Learning: Breaking the problem into smaller logical steps helps eliminate unnecessary conversions and leads to a more optimized solution. Leetcode #10 🔹 Regular Expression Matching • Methodology Applied: Dynamic Programming • Approach: Used a DP table where dp[i][j] represents whether the first i characters of string s match the first j characters of pattern p Handled two special cases carefully: → matches any single character → matches zero or more of the preceding element Built the solution bottom-up by considering all valid transitions 📌 Key Learning: Once the DP logic is clear, the solution becomes systematic. 📌 Day 3 Takeaway: Easy problems test clarity. Moving to Day 4 🔁 #Day3 #100DaysOfCode #LeetCode #DSA #ProblemSolving #CPlusPlus #BuildInPublic #DynamicProgramming #LearningInPublic 🚀
Day 3 LeetCode Practice: Palindrome Number & Regex Matching
More Relevant Posts
-
🔥 Day 5 | Round 4 — Deep Dive into LIS! 🔥 Solved a classic LeetCode problem — Longest Increasing Subsequence (LIS) 💡 Explored this problem through multiple Dynamic Programming approaches, gradually optimizing from basic recursion to an efficient optimal solution. 🧩 Approaches Covered: Recursive DP (Take / Not Take) DP with Memoization Tabulation (Bottom-Up DP) Space Optimized DP Optimal Approach using Binary Search (O(n log n)) This problem was a great example of how understanding fundamentals helps in reaching optimal solutions 💪 Learning when to optimize is just as important as solving the problem 🚀 🔹 Concepts Used: Dynamic Programming | Binary Search | Optimization 🔹 Key Takeaway: Start simple, then optimize—clarity leads to efficiency 🧠 #30DaysOfCode #Round4 #Day5 #LeetCode #DynamicProgramming #LIS #BinarySearch #DSA #ProblemSolving #CodingChallenge #DeveloperJourney #CodeEveryday #CPlusPlus #LearnByDoing #ConsistencyIsKey 🚀
To view or add a comment, sign in
-
-
After solving 400+ problems on LeetCode, I realized that progress in DSA is less about memorizing solutions and more about how you think. Two things stood out as game changers for me: 🔍 1. Observation Before jumping into code, taking time to deeply observe the problem changes everything. Understanding constraints, edge cases, and hidden conditions often reveals the simplest path to the solution. 🧩 2. Pattern Recognition (Most Important) Most problems are not new — they are variations of known patterns: Sliding Window Two Pointers Binary Search on Answer DP States Greedy Choices Graph Traversals Once you recognize the pattern, half the problem is already solved. 📈 My biggest takeaway Consistency + reflection beats speed. Every wrong submission taught me why a solution works — and where it fails. Still learning. Still improving. On the journey to becoming a better problem solver every day 💻🔥 #LeetCode #DSA #ProblemSolving #Consistency #CodingJourney #SoftwareEngineering
To view or add a comment, sign in
-
-
The art of breaking things down. 🧩 The hardest part of coding isn't typing the syntax; it's learning how to think. This graphic sums it up perfectly. Whether you are building a complex backend system or just making morning tea, the logic remains the same: Gather inputs → Validate conditions → Execute the plan. If you can learn to break down problems like this, you can master any programming language. Happy coding! 🚀 #ProblemSolving #DeveloperMindset #CodingTips #LogicBuilding #TechCommunity
To view or add a comment, sign in
-
-
#Day18of2026 | LeetCode Practice 📌 Problem: 746 – Min Cost Climbing Stairs 🔗 Link : https://lnkd.in/gsMt554p 📚 Concept: Dynamic Programming, Recursion → Memoization → Tabulation 💡 Intuition: At each step, you can climb either 1 or 2 stairs, and you must pay the cost of the step you land on. - So at any index i, the minimum cost to reach there depends on the minimum cost to reach the previous one or two steps. This naturally forms a DP relation: - Either come from i-1 or i-2, choosing the cheaper path - The final answer is the minimum cost to reach either of the last two steps - Starting with recursion helps understand the decision-making, but it has overlapping subproblems. - Optimizing it using memoization and then tabulation gives an efficient bottom-up solution. 🧠 Key Learning: Many staircase problems follow a clear “1-step or 2-step choice” DP pattern. Once the recurrence is clear, recursion can be systematically optimized into an iterative DP solution. 📎 Sharing how evolving from recursion to tabulation makes the solution efficient . https://lnkd.in/gJ4PnpEF #LeetCode #DSA #DynamicProgramming #Consistency #LearningInPublic #LeetCodeDaily #JavaDSA
To view or add a comment, sign in
-
-
Day 6 | Copy-Paste to Logic-Based 🚀 Today’s problem may look simple at first glance, but it strongly reinforces conditional thinking and clean control flow. Solved Fizz Buzz (LeetCode 412) — a classic problem that tests how well you understand conditions, order of checks, and edge cases, rather than just syntax. 🧠 Key Learnings: • The order of conditions matters more than the conditions themselves • Always check the most restrictive case first (divisible by both 3 & 5) • Writing readable conditional logic is as important as correctness • Simple problems help build strong foundations for complex logic later • Clean if-else chains improve both clarity and maintainability 🔍 Approach (Brief): • Iterate from 1 to n • Check divisibility by 3 and 5 in the correct order • Push the appropriate string into the result array ⏱️ Time & Space Complexity: • Time Complexity: O(n) • Space Complexity: O(n) FizzBuzz isn’t about difficulty — it’s about thinking clearly, structuring logic properly, and mastering fundamentals. Day 6 done. Consistency > Motivation. 💪📈 ⸻ #CopyPasteToLogicBased #Day6 #DSA #DataStructures #Algorithms #LeetCode #ProblemSolving #Coding #Programming #CPlusPlus #Cpp #SoftwareEngineering #ComputerScience #Developer #DevelopersOfLinkedIn #LearningInPublic #CodingJourney #DailyCoding #Consistency #Discipline #GrowthMindset #TechJourney #InterviewPreparation #PlacementPreparation #LogicBuilding #BeginnerToAdvanced #CodeNewbie #StudentDeveloper #FutureEngineer #TechCommunity
To view or add a comment, sign in
-
-
#Day12of2026 | LeetCode Practice 📌 Problem: 198 – House Robber 🔗 Link : https://lnkd.in/gbm_D9Yh 📚 Concept: Dynamic Programming, Recurrence Relation, Space Optimization 💡 Intuition: At every house, you face a simple decision: rob it or skip it. However, if you rob the current house, you cannot rob the adjacent one, which introduces overlapping subproblems. The core idea is to define a DP state where each index represents the maximum money that can be robbed up to that house. This leads to a classic recurrence: Either skip the current house and keep the previous maximum Or rob the current house and add it to the result from two houses back The problem naturally evolves from: 1. Memoization (top-down) → clear recursion 2. Tabulation (bottom-up) → iterative DP 3. Space optimization → keeping only the last two states 🧠 Key Learning: - Many DP problems reduce to a clear pick vs not-pick decision at each index. - Once the recurrence is identified, DP solutions can often be optimized from O(n) space to O(1). 📎 Sharing how progressing from memoization to space-optimized DP leads to a clean and efficient solution. https://lnkd.in/gK5Gkhh6 #LeetCode #DSA #DynamicProgramming #Consistency #LearningInPublic #LeetCodeDaily #JavaDSA
To view or add a comment, sign in
-
-
🔥 Day 6 | Round 4 — Building on LIS Concepts! 🔥 Solved a LeetCode problem — Russian Doll Envelopes 💡 This problem combined sorting techniques with the Longest Increasing Subsequence (LIS) concept to achieve an efficient solution. By sorting envelopes smartly and applying the O(n log n) LIS approach, the problem became much more manageable 💪 Great practice for understanding how classic patterns extend to more complex problems 🚀 🔹 Concepts Used: Sorting | Dynamic Programming | Binary Search | LIS 🔹 Key Takeaway: The right preprocessing step can simplify even the toughest problems 🧠 #30DaysOfCode #Round4 #Day6 #LeetCode #DynamicProgramming #LIS #BinarySearch #Sorting #DSA #ProblemSolving #CodingChallenge #DeveloperJourney #CodeEveryday #CPlusPlus #LearnByDoing #ConsistencyIsKey 🚀
To view or add a comment, sign in
-
-
🔥 Day 8 | Round 4 — Learning Through Optimization! 🔥 Solved a LeetCode problem — Longest Arithmetic Subsequence 💡 This problem focuses on identifying the longest subsequence with a constant difference using Dynamic Programming. 🧩 Approaches Explored: Recursive DP with Memoization ➤ Worked for most cases but resulted in TLE on one test case due to high recursive overhead. Bottom-Up Tabulation using Hash Maps ➤ Efficiently stored differences and avoided repeated computations. Switching from memoization to tabulation helped optimize performance and pass all test cases 💪 A great reminder that the right approach matters as much as the logic 🚀 🔹 Concepts Used: Dynamic Programming | Hash Maps | Tabulation 🔹 Key Takeaway: When recursion hits limits, iterative DP often provides the needed performance boost 🧠 #30DaysOfCode #Round4 #Day8 #LeetCode #DynamicProgramming #Tabulation #DPOptimization #DSA #ProblemSolving #CodingChallenge #DeveloperJourney #CodeEveryday #CPlusPlus #LearnByDoing #ConsistencyIsKey 🚀
To view or add a comment, sign in
-
-
💡 𝐏𝐫𝐨𝐠𝐫𝐚𝐦𝐦𝐢𝐧𝐠 𝐯𝐬. 𝐏𝐫𝐨𝐛𝐥𝐞𝐦 𝐒𝐨𝐥𝐯𝐢𝐧𝐠 You can master syntax, memorize libraries, and learn multiple languages… but if you can’t approach a problem effectively, none of that matters. That’s why I believe 𝐩𝐫𝐨𝐛𝐥𝐞𝐦 𝐬𝐨𝐥𝐯𝐢𝐧𝐠 𝐢𝐬 𝐟𝐚𝐫 𝐦𝐨𝐫𝐞 𝐢𝐦𝐩𝐨𝐫𝐭𝐚𝐧𝐭 𝐭𝐡𝐚𝐧 𝐩𝐫𝐨𝐠𝐫𝐚𝐦𝐦𝐢𝐧𝐠 𝐢𝐭𝐬𝐞𝐥𝐟. Because at the end of the day, the end user only cares about the issue resolution not the complexity of the code behind it. 🔹 My personal experience: Work on improving problem solving skill more via several platforms like (HackerRank, LeetCode, Codewars, GeeksforGeeks, etc) as strong problem solvers adapt to any language, any framework, and any challenge. Programming is just the tool while problem solving is the mindset. What do you think? does problem solving outweigh programming in your journey or not? #problem #problemsolving #programming #program #opinion #python #programmer
To view or add a comment, sign in
-
-
#Day8of2026 | LeetCode Practice 📌 Problem: 712 – Minimum ASCII Delete Sum for Two Strings 📚 Concept: Dynamic Programming, Longest Common Subsequence (LCS) Variant, String DP 💡 Intuition: The goal is to make two strings equal by deleting characters with minimum total ASCII cost. Instead of directly simulating deletions, the problem becomes easier when viewed from a keep-maximum perspective. Key observation: - If we retain a common subsequence with the maximum possible ASCII sum, then everything else must be deleted. - So the idea is: Compute the total ASCII sum of both strings. Find the maximum ASCII sum of a common subsequence between the two strings (a weighted LCS). The minimum deletion cost is simply the ASCII sum of characters not part of this common subsequence. This converts a deletion problem into a DP-based optimization problem. 🧠 Key Learning: Classic LCS can be extended by weighting characters instead of counting length. Subtracting 2 × commonAscii accounts for removing non-common characters from both strings. 📎 Sharing how transforming the problem perspective leads to a clean DP solution. https://lnkd.in/gmDh6bNz #LeetCode #DSA #DynamicProgramming #StringDP #Consistency #LearningInPublic #LeetCodeDaily #JavaDSA #ProblemSolving #LeetCodePOTD
To view or add a comment, sign in
-
Explore related topics
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development