🚀 Day 26 of 100 Days of LeetCode 📘 Problem: Search a 2D Matrix 💻 Language: Java ✅ Status: Accepted — Runtime: ⚡ 0 ms (Beats 100%) Today’s problem focused on searching efficiently within a 2D matrix — a great exercise for understanding nested loops, traversal logic, and time optimization. While this version used a simple brute-force approach, it served as a good refresher on matrix iteration patterns before moving on to more optimized binary search techniques in 2D grids. ✨ Key Learnings: Matrix traversal can be intuitive when visualized 🔢 Always consider both brute-force and optimized approaches — understanding both is key to depth of knowledge Writing clean, readable code matters as much as optimizing it Each problem solved is another small brick in the foundation of strong problem-solving skills 💪 #Day26 #100DaysOfCode #LeetCode #Java #ProblemSolving #DSA #CodingJourney #SoftwareDevelopment #Matrix #KeepLearning #CodeEveryday
Sunny Kumar’s Post
More Relevant Posts
-
🚀 Day 20 of #100DaysOfLeetCode 💡 Problem: Gray Code Today’s challenge was all about generating the Gray Code sequence, a fascinating binary numbering system where only one bit changes between consecutive numbers. 🧠 Concept: Gray codes are widely used in digital communication and error correction, ensuring minimal transition errors between binary states. 🔍 Key takeaway: Bit manipulation + recursion = elegant solution ✨ 💻 Languages used: Java #LeetCode #100DaysOfCode #ProblemSolving #CodingChallenge #Java #GrayCode #DSA #BitManipulation
To view or add a comment, sign in
-
-
🚀 Day 34 of 100 Days of LeetCode 📘 Problem: Merge Intervals 💻 Language: Java ✅ Status: Accepted — Runtime ⚡ 8 ms (Beats 86%) Today’s challenge was all about mastering interval merging, an essential concept for solving scheduling and range-based problems efficiently 🧩 By sorting intervals and carefully merging overlapping ones, I learned how crucial boundaries and comparisons are — both in coding and in life. ✨ Key Learnings: Sorting simplifies complex interval logic Smart use of conditions avoids unnecessary comparisons Handling edge cases builds precision thinking ⚙️ 💬 “Merge where it makes sense — in code and in life.” #Day34 #100DaysOfCode #LeetCode #Java #DSA #ProblemSolving #Algorithms #CodingJourney #SoftwareDevelopment #KeepLearning #CodeEveryday
To view or add a comment, sign in
-
-
💻 Day 45 of #LeetCode Journey 🚀 ✅ Problem: Count and Say 📘 Language: Java 🔹 Status: Accepted (30/30 test cases passed) 🔹 Runtime: 4 ms | Beats 55.38% 🔹 Memory: 41.86 MB 🧠 Concept: This problem is about generating the n-th term in the “count and say” sequence. Each term is built by describing the previous term — count the number of digits and say them in order. 🧩 Approach: Start with "1". For each iteration, use a StringBuilder to construct the next sequence. Track consecutive digits using a counter. Append the count and digit when the sequence changes. 💡 Efficient string manipulation and iteration give optimal performance. 🔥 Every solved problem builds confidence. One step closer to mastering patterns in strings! #Day45 #LeetCode #Java #CodingChallenge #ProblemSolving #CountAndSay #50DaysOfCode
To view or add a comment, sign in
-
-
🌟 Day 93 of #100DaysOfCodingChallenge 🌟 🔹 Problem: 442. Find All Duplicates in an Array 🔹 Platform: LeetCode 🔹 Language: Java 🔹 Difficulty Level: Medium 🧩 Problem Statement: Given an integer array nums containing numbers from 1 to n, find all the elements that appear twice in the array. 💡 Intuition: To identify duplicates efficiently, I used two HashSets — one to store visited elements and another to store duplicates when an element is already seen. This method makes the solution concise and easy to understand while maintaining good performance. ✅ Time Complexity: O(n) ✅ Space Complexity: O(n) 🚀 Key Takeaway: Sometimes, clarity and simplicity in code matter more than optimization — this approach is easy to implement and perfectly suitable for most scenarios. #Day93 #LeetCode #100DaysOfCode #Java #ProblemSolving #CodingChallenge #DSA #LearnByCoding #WomenInTech
To view or add a comment, sign in
-
-
🚀 Day 29 of 100 Days of LeetCode 📘 Problem: Combination Sum 💻 Language: Java ✅ Status: Accepted — Runtime ⚡ 2 ms (Beats 86%) Today’s problem was all about backtracking — exploring all possible combinations to reach a target sum. It’s a perfect blend of recursion, decision-making, and pruning unnecessary paths 🧠 ✨ Key Learnings: Backtracking is like exploring a maze — try, backtrack, and try again until you find the exit 🌀 Each recursive call represents a “choice point” — include or skip the element Clean recursion with controlled base cases leads to clarity and precision This problem reminded me how persistence works in both code and life: 💬 “Sometimes, the path to the solution is not straightforward — you just need to keep exploring.” #Day29 #100DaysOfCode #LeetCode #Java #Backtracking #Recursion #DSA #ProblemSolving #CodingJourney #SoftwareDevelopment #KeepLearning #CodeEveryday
To view or add a comment, sign in
-
-
Day 46 of #100DaysOfLeetCode Challenge 🚀Today’s Problem: Remove Duplicate Letters (LeetCode - Medium) Language: Java In this problem, the goal is to remove duplicate letters from a string such that every letter appears once and the result is the smallest lexicographical order possible. Concepts Covered: Stack for maintaining order Greedy approach for smallest lexicographical sequence Tracking last occurrence index of each character Boolean array to keep track of visited characters Key Takeaways: Understanding when to remove elements from the stack is crucial for optimal ordering. The combination of stack + greedy ensures both uniqueness and lexicographical minimality. #100DaysOfCode #LeetCode #Java #ProblemSolving #CodingChallenge #DSA #DevelopersJourney
To view or add a comment, sign in
-
-
✅ Day 57/100 — LeetCode Challenge Problem: Transpose Matrix Language: Java Today I worked on a classic matrix operation — transposing a matrix. The goal is to convert rows into columns and vice-versa. This problem reinforced my understanding of 2D arrays and index manipulation in Java. 💡 Key Idea: If matrix has dimensions m x n, the transpose will have dimensions n x m, and each element at (i, j) becomes (j, i). 📌 Approach: Calculate row & column length Create result matrix with swapped dimensions Iterate & swap positions accordingly #100DaysOfCode #LeetCode #Java #DSA #Matrix #TechJourney #CodingChallenge #SoftwareEngineering #LearningEveryday
To view or add a comment, sign in
-
-
Day 89 of #100DaysOfCode Solved Find Numbers with Even Number of Digits in Java 🔢 Approach The goal of this problem was to count how many integers in a given array have an even number of digits. I implemented two methods: findNumbers(int[] nums): This is the main function that iterates through every number in the input array nums. isEvenOrOdd(int n): This helper function takes an integer and determines if its digit count is even or odd. Inside the helper function, I used a while loop to count the digits: I initialized a count to 0. The loop continues as long as $n > 0$. In each iteration, I increment count and then perform integer division by 10 (n = n / 10) to remove the least significant digit. Finally, I return true if the total count of digits is even (count \% 2 == 0). This efficient, digit-by-digit checking approach resulted in a strong performance, beating 98.90% of other submissions. #Java #100DaysOfCode #LeetCode #CodingChallenge #Algorithms #Array #ProblemSolving #Optimization
To view or add a comment, sign in
-
-
📌 Day 16/100 - Reverse String (LeetCode 344) 🔹 Problem: Reverse a given string in-place — meaning you must modify the original array of characters without using extra space. 🔹 Approach: Used the two-pointer technique — one starting at the beginning and one at the end of the array. Swap characters at both pointers, then move them closer until they meet. Efficient, clean, and runs in linear time without additional memory allocation. 🔹 Key Learnings: In-place algorithms optimize space complexity significantly. The two-pointer pattern is a versatile tool for many array and string problems. Understanding mutable vs immutable structures in Java is crucial for memory efficiency. Sometimes, the simplest logic beats the most complex one. 🧠 “True efficiency lies in simplicity, not complexity.” #100DaysOfCode #LeetCode #Java #ProblemSolving #DSA #CodingJourney #TwoPointers
To view or add a comment, sign in
-
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