There was a time when even starting a problem felt confusing. Reading the question multiple times, not knowing where to begin, and getting stuck often. With consistent practice, things started to change — patterns became familiar, approaches became clearer, and solving started to feel more structured. That consistency has now led to solving 150 problems on LeetCode. Focused on building a strong foundation through arrays, strings, hashing, sliding window, and binary search — spending more time understanding the logic rather than just aiming for accepted submissions. This journey improved: * Problem breakdown and thinking approach * Pattern recognition across questions * Code clarity and structure Currently working on improving speed and taking on more challenging problems. 🔗 LeetCode Profile: https://lnkd.in/gkf7m6wp #LeetCode #DSA #Java #ProblemSolving #Coding #SoftwareEngineering
From Confusion to Consistency on LeetCode
More Relevant Posts
-
#Day357 of #1001DaysOfCode LeetCode Daily Challenge Problem: Decode the Slanted Ciphertext (LeetCode 2075) 💡 Approach: The encoded string represents a matrix filled row-wise. I traversed the matrix diagonally (top-left to bottom-right) by converting 2D indices into a 1D string index. Finally, removed trailing spaces to get the correct decoded message. (*you can use inbuilt .stripTrailing() function as well) ⏱ Time Complexity: O(n) 🧠 Space Complexity: O(n) Staying consistent with daily problem solving 🚀 #DSA #Java #LeetCode #ProblemSolving #Coding
To view or add a comment, sign in
-
-
#Day92 Of Problem Solving Today’s LeetCode problem turned out to be simpler than I expected — but only after looking at it from the right angle. At first, I was thinking of solving it using loops or recursion. But then I realized there’s a much cleaner way using a small mathematical trick to check if a number is a power of three. That shift in thinking made the solution not just easier, but also more efficient. Result: Runtime: 7 ms (beats 100%) Memory: 46 MB Moments like this remind me that problem solving isn’t always about writing more code, it’s about finding better approaches.Trying to stay consistent and improve a little every day. #LeetCode #Java #DSA #ProblemSolving #CodingJourney #LinkedIn
To view or add a comment, sign in
-
-
“What I learned after solving 300+ LeetCode problems 👇” At the beginning, I made a mistake. I kept solving random problems every day thinking: “More problems = more skill” But I was wrong. I realized that solving problems randomly is mostly a waste of time if you don’t understand the pattern behind them. Everything changed when I started focusing on patterns instead of problems. Here are some important patterns I learned: • Sliding Window • Two Pointers • Prefix Sum • Binary Search • Recursion & Backtracking • Linked List Patterns • Stack & Monotonic Stack • Hashing / Frequency Count Once you understand these patterns: You don’t need to solve 1000 problems. You start recognizing solutions instantly. Now when I see a problem, I don’t panic. I ask: 👉 “Which pattern does this belong to?” That one question changed everything for me. Still learning, but now with direction 🚀 #DSA #LeetCode #Java #BackendDevelopment #CodingJourney
To view or add a comment, sign in
-
🚀 Just solved LeetCode Problem #7 – Reverse Integer At first, it looked like a simple problem: reverse the digits of a number. But while solving it, I realized it’s not about reversing… it’s about thinking deeper. Here’s what I actually learned 👇 🔹 1. Think before things break Instead of checking overflow after it happens, I learned to prevent it before it happens using conditions like: → checking limits before multiplying by 10 🔹 2. Edge cases are everything The logic was easy. Handling edge cases like: very large numbers negative values integer limits …was the real challenge. 🔹 3. Don’t trust the compiler blindly Languages like Java won’t throw an error on overflow — they silently give wrong values. That was a big realization. 🔹 4. Patterns matter The simple step: → ans = ans * 10 + digit is a powerful pattern used in many problems. 🔹 5. Clean logic > shortcuts Using long was easy, but solving it properly with constraints made me understand the problem deeply. 💡 Biggest takeaway: Writing code that works is good. Writing code that is safe and correct in all cases is what really matters. On to the next problem 💪 #LeetCode #DSA #DataStructures #Algorithms #CodingJourney #LearnToCode #Programming #Java #SoftwareEngineering #ProblemSolving #CodingPractice #TechSkills #Developers #100DaysOfCode #CodeNewbie #InterviewPrep #CodingLife #GrowthMindset
To view or add a comment, sign in
-
-
🚀 Day 88 – DSA Journey | Binary Tree Postorder Traversal Continuing my daily DSA practice, today I tackled one of the trickier tree traversals using an iterative approach. 📌 Problem Practiced: Binary Tree Postorder Traversal (LeetCode 145) 🔍 Problem Idea: Traverse a binary tree in postorder — Left → Right → Root — and return the node values. 💡 Key Insight: Postorder traversal is not straightforward iteratively. A clever trick is to reverse a modified preorder traversal (Root → Right → Left) to achieve the correct order. 📌 Approach Used: • Use a stack to process nodes • Traverse in Root → Right → Left order • Insert elements at the beginning of the result list • This effectively reverses the order to get Left → Right → Root 📌 Concepts Strengthened: • Tree traversal (Postorder) • Stack usage • Iterative traversal tricks • Reversing traversal logic ⏱️ Time Complexity: O(n) 📦 Space Complexity: O(n) 🔥 Today’s takeaway: Sometimes solving a problem becomes easier when you reverse the perspective — small tricks can simplify complex logic. On to Day 89! 🚀 #Day88 #DSAJourney #LeetCode #BinaryTree #Stack #Java #ProblemSolving #Coding #LearningInPublic #Consistency
To view or add a comment, sign in
-
-
#Day360 of #1001DaysOfCode 📘 LeetCode Daily Challenge Problem: Search in a Binary Search Tree (LeetCode 700) 💡 Approach: Used the properties of a Binary Search Tree to efficiently search for a value. At each step: If the value is smaller, move to the left subtree If larger, move to the right subtree This reduces the search space at every step. ⏱ Time Complexity: O(h) 🧠 Space Complexity: O(h) Continuing daily consistency in problem solving 🚀 #DSA #Java #LeetCode #BinaryTree #ProblemSolving #Coding
To view or add a comment, sign in
-
-
Solved Today’s LeetCode Daily Challenge! Problem: Check if Strings Can Be Made Equal With Operations II At first glance, it looks like a swapping problem… but the real trick is understanding the constraint You can only swap characters if the distance between indices is even. Key Insight: Characters at even indices can only swap among even positions Characters at odd indices can only swap among odd positions So instead of simulating swaps (which is messy ), I used a smarter approach: Count frequency of characters at even indices Count frequency at odd indices Compare both strings If both match → Possible Else → Not possible Time Complexity: O(n) Space Complexity: O(1) Takeaway: Sometimes problems look complex, but a small observation can simplify everything. Consistency + pattern recognition = #LeetCode #DSA #Java #Coding #ProblemSolving #TechJourney #100DaysOfCode
To view or add a comment, sign in
-
-
#Day373 of #1001DaysOfCode LeetCode Daily Challenge Problem: Words Within Two Edits of Dictionary (LeetCode 2452) Approach: For each query word, compared it with every word in the dictionary and counted character mismatches. If the difference was at most 2 characters, the word was added to the result. Used early stopping to optimize comparisons. ⏱ Time Complexity: O(Q × D × L) 🧠 Space Complexity: O(1) Improving efficiency with small optimizations #DSA #Java #LeetCode #ProblemSolving #Coding #Consistency
To view or add a comment, sign in
-
-
🚀 Solved LeetCode Problem #58 – Length of Last Word Today I worked on a simple yet insightful string manipulation problem that emphasizes attention to edge cases. 🔍 Problem Insight: Given a string containing words and spaces, the goal is to find the length of the last word, ignoring any trailing spaces. 💡 Approach Used: Instead of using built-in methods like split(), I implemented an optimized approach by: Traversing the string from the end Skipping trailing spaces Counting characters until the next space is encountered This approach avoids extra space usage and improves efficiency. 🧠 Key Learning: Importance of handling edge cases like trailing spaces How reverse traversal can simplify string problems Writing memory-efficient solutions 📈 Complexity: Time: O(n) Space: O(1) ✨ Problems like this help strengthen: String manipulation skills Logical thinking Writing clean and optimized code Consistency is key—one step closer to mastering DSA! 💪 #LeetCode #DSA #StringManipulation #Coding #ProblemSolving #Java #TechJourney
To view or add a comment, sign in
-
-
🔥 Day 31/100 – DSA Problem Solving 📌 Problem: 412. Fizz Buzz (LeetCode) Today’s problem looks simple, but it really tests your logic building and attention to detail. 💡 My Approach: I used a loop from 1 to n For each number: If divisible by both 3 & 5 → "FizzBuzz" If divisible by 3 → "Fizz" If divisible by 5 → "Buzz" Otherwise → convert number to string 🧠 What I Learned Today: ✅ Importance of using the correct variable inside loops ✅ Order of conditions matters (3 & 5 first) ✅ Writing clean and readable logic ✅ Even easy problems can teach debugging skills 🚀 Key Takeaway: Don’t underestimate easy problems — they help build strong fundamentals and improve problem-solving thinking. 💻 Code Concept: Used simple loop + conditional statements + list to store results. #Day31 #100DaysOfCode #DSA #LeetCode #Java #CodingJourney #ProblemSolving
To view or add a comment, sign in
-
Explore related topics
- Leetcode Problem Solving Strategies
- LeetCode Array Problem Solving Techniques
- How to Develop Structured Problem Solving Skills
- Building Coding Skills Through Consistent Practice
- Tips for Problem-Solving with Clarity
- Improving Code Clarity for Senior Developers
- Tips for Continuous Improvement in Problem Solving
- How to Ask Questions for Better Problem-Solving Skills
- Problem Solving Techniques for Developers
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