Day 28 | LeetCode Learning Journal 🚀 Today I tackled Problem 37: Sudoku Solver, and this one was a true test of patience and algorithmic thinking. Moving from simple patterns to complex backtracking has been a game-changer. It’s fascinating how recursion allows us to explore thousands of possibilities, "pruning" the ones that don't work and pivoting until we find the perfect solution. It’s not just about writing code; it’s about teaching the program how to make decisions. Key takeaways from today: Backtracking Mastery: Understanding how to "undo" a choice is as important as making one. Validation Logic: Breaking down constraints (rows, columns, and 3x3 grids) into clean, reusable functions. #LeetCode #100DaysOfCode #CodingJourney #ProblemSolving #CPlusPlus #DSA #Backtracking #LearningInPublic #KeepGrowing
LeetCode Day 28: Sudoku Solver Challenge with Backtracking
More Relevant Posts
-
Day 2 | LeetCode Learning Journal 🚀 Today I worked on N-Queens (Problem 51) on LeetCode another classic backtracking problem. After solving Sudoku on Day 1, I felt more prepared, but N-Queens had its own twist. The biggest challenge was managing diagonal attacks efficiently. Learning that row - col and row + col can uniquely track diagonals was a game-changing moment. 💡 Instead of checking the entire board every time, I used separate arrays for columns and diagonals to keep the solution optimized and clean. This really improved my understanding of how to structure recursive calls properly. 🌱 What I learned: • Backtracking works best with smart state management • Clean validation reduces time complexity • Confidence grows when you tackle hard problems consistently #LeetCode #100DaysOfCode #CodingJourney #Backtracking #DSA #Day2
To view or add a comment, sign in
-
-
Day 3 | LeetCode Learning Journal 🚀 Today I solved Combination Sum (Problem 39) on LeetCode another powerful backtracking problem. Compared to N-Queens, this one focused more on exploring combinations systematically while avoiding unnecessary paths. The interesting part was that we can reuse the same element multiple times, which changes how we design the recursive calls. The key learning was understanding how to: Keep track of the remaining target Use a start index to avoid duplicate combinations. Backtrack properly by removing the last added element after recursion .Instead of generating all possibilities blindly, I learned how pruning works if the current sum exceeds the target, we immediately stop exploring that path. This makes the solution much more efficient. 💡 🌱 What I learned: • How to generate combinations using recursion • Importance of pruning in backtracking • Managing state with push and pop operations • Thinking in terms of decision trees #LeetCode #100DaysOfCode #CodingJourney #Backtracking #DSA #Day3
To view or add a comment, sign in
-
-
💡 LeetCode Practice – Increasing Triplet Subsequence Today I learned that not every problem can be solved using sorting. Maintaining the original order and thinking in terms of traversal is crucial. 📌 Key Learning: Importance of index order (i < j < k) Optimizing from brute force to O(n) Smart tracking instead of extra space Consistency is building confidence 🚀 #leetcode #codingjourney #webdevelopment #dsa
To view or add a comment, sign in
-
-
🔥 Is LeetCode Runtime Ranking Always True? I recently started my LeetCode consistency journey, solving problems daily to improve my DSA skills. While exploring submissions and leaderboards, I noticed something interesting. Some solutions show 0 ms runtime. At first I thought it was insane optimization… but after digging deeper, I discovered a small trick that can edit the runtime display to 0 ms using a simple code snippet that runs when the program exits. Just a tiny snippet and a small change in the file — and the runtime can appear as 0 ms even if the actual runtime is higher. ⚠️ Of course, this doesn’t make the algorithm faster. Real performance still comes from better logic, time complexity, and clean implementations. Still, discovering these kinds of tricks while learning DSA is pretty fascinating. If you want the code snippet, comment “LeetCode” or DM me — I’ll share it. 🚀 #LeetCode #DSA #Algorithms #CodingInterview #SoftwareEngineering #DeveloperJourney #Programming #CompetitiveProgramming #CodingTips
To view or add a comment, sign in
-
-
Day 79 | #100DaysOfCode | #100DaysOfLearning 🧿 Still diving deeper into the Binary Tree pattern ✅ Solved: Symmetric Tree (Leetcode 101) This problem checks whether a binary tree is a mirror of itself around its center. 💡 Key Idea: Instead of comparing nodes in the same direction, we compare them crosswise: Left subtree of node A ↔ Right subtree of node B Right subtree of node A ↔ Left subtree of node B If both sides match at every level → the tree is symmetric. Approach (Recursion): If both nodes are NULL → symmetric If one is NULL → not symmetric Values must match Recursively compare: left.left with right.right left.right with right.left 📌 This problem strengthened my understanding of: ✔️ Mirror recursion in trees ✔️ Comparing two structures simultaneously ✔️ Thinking about trees from two directions at once Consistency continues… 79 days of showing up and learning something new. #100DaysOfCode #DSA #BinaryTree #Leetcode #CodingJourney #ProblemSolving #SoftwareEngineering #TechCommunity #Programmers #Developers #LearnInPublic
To view or add a comment, sign in
-
-
🚀 Day 53 | Problem Solving Today I focused on problem solving as part of my journey with 10000 Coders. I worked on an important problem “Plus One”, where we need to add 1 to a number represented as a list of digits. 👉 Example: Input: [9, 9, 9] Output: [1, 0, 0, 0] In this problem, I learned how to handle: • Reverse iteration (starting from last digit) • Carry handling when digit becomes 10 • Edge cases like all digits being 9 I used a loop from the end of the list and updated digits step by step. If the digit is less than 9, I simply increment it. If it is 9, I convert it to 0 and continue. Finally, if all digits are 0, I add 1 at the beginning. This problem helped me improve my: • Logical thinking • Handling edge cases • Understanding of list manipulation Step by step becoming better at problem solving 🚀💪 #Day53 #Python #ProblemSolving #CodingPractice #10000Coders #PythonJourney #FullStackJourney #SravanKumarSir
To view or add a comment, sign in
-
-
Day 4 | LeetCode Learning Journal 🚀 Today I solved Permutations (Problem 46) on LeetCode another classic backtracking problem that really strengthens recursion fundamentals. Unlike Combination Sum where we focused on reaching a target, this problem was about generating all possible arrangements of given numbers. The main challenge was making sure that each element is used exactly once in every permutation. The key learning was understanding how to: Keep track of which elements are already used. Build permutations step by step. Backtrack properly by removing the last element and marking it unused after recursion. Instead of randomly arranging numbers, I learned how the decision tree works at every level we choose one unused number, explore deeper, and then backtrack to try other possibilities. This systematic exploration ensures we generate all permutations efficiently. 💡 🌱 What I learned: • How to generate permutations using recursion • Using a visited array / boolean tracking • Proper backtracking with push and pop • Visualizing recursion as a decision tree #LeetCode #100DaysOfCode #CodingJourney #Backtracking #DSA #Day4
To view or add a comment, sign in
-
-
🚀 Day 19 | 100 Days of Coding Challenge #DrGViswanathanChallenge 📘 Problem Solved: Combination Sum III 🔧 Approach Used (Backtracking): • Generated combinations using numbers 1–9 • Ensured each number is used only once • Maintained a running sum and current combination • If the sum becomes 0 and the combination size equals k, we store the result • Used backtracking (Choose → Explore → Undo) to explore all valid possibilities ⏳ Complexity: Time: O(2⁹) (since numbers are from 1–9) Space: O(k) recursion stack 🧠 Key Learning: Backtracking is powerful for generating combinations with constraints like fixed size (k) and target sum (n). Using a starting index (last) ensures elements are not reused and avoids duplicate combinations. 📂 Topics Covered: Backtracking, Recursion, Combinations, Constraint-based Search #100DaysOfCode #DSA #LeetCode #CPP #CodingJourney #Backtracking #CompetitiveProgramming
To view or add a comment, sign in
-
-
🚀 Just came across an amazing collection of Competitive Programming (CP) & DSA resources! From beginner-friendly tutorials to advanced problem-solving guides, this repo has it all: 🔹 DSA Video Bootcamps – Kunal Kushwaha, Errichto, William Lin, Gaurav Sen 🔹 Problem Sets & Tips – CSES, CP-Algorithms, LeetCode, HackerEarth, DP Roadmaps, Graphs, Math for CP 🔹 Interview Prep & System Design – Mock interviews, Coding patterns, Gaurav Sen’s System Design content, Big-O cheatsheets 🔹 Practice Platforms – Codeforces, LeetCode, AtCoder, Hackerrank, Google Kickstart & Code Jam, ICPC, and more 🔹 Books & Guides – Competitive Programming Handbooks, Cracking the Coding Interview, Elements of Programming Interviews. 💻 The repository is forked from Kunal Kushwaha GitHub and constantly updated by contributors: 👉https://lnkd.in/gui3qSgV If you’re looking to level up your coding skills, ace interviews, or excel in contests, this is a goldmine. 🔥 Thanks to all the contributors for making such a comprehensive collection ❤️ #CompetitiveProgramming #DSA #CodingInterview #SystemDesign #LeetCode #Codeforces #LearningResources
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