🚀 Day 9/30 — LeetCode Challenge Solved a problem on LeetCode involving "mirror distance of a number" The task was to reverse the digits of a number and compute the absolute difference with the original value. ✅ Key takeaway: Simple problems still reinforce core concepts like "digit manipulation and number handling" Consistency continues. #LeetCode #Java #ProblemSolving #Consistency
LeetCode Challenge: Mirror Number Distance
More Relevant Posts
-
Day 78 of #LeetCode 🚀 Solved: Number of Steps to Reduce a Number to Zero Today’s problem was simple but a great reminder of how important basic logic and loops are. 💡 Key Idea: If number is even → divide by 2 If odd → subtract 1 Repeat until it becomes 0 📌 Focus: Strengthening fundamentals Writing clean and efficient logic Consistency > Complexity 💯 Slowly building problem-solving mindset every day. #Day78 #CodingJourney #Java #DSA #LeetCode #Consistency #FutureDeveloper
To view or add a comment, sign in
-
-
#Day72 Of Problem Solving Solved today’s LeetCode Daily Challenge ✅. Problem: Check if Binary String Has at Most One Segment of Ones Sometimes, the simplest logic gives the best results. Instead of overthinking, I went with a clean approach—just checking if "01" exists in the string. If it does, that means more than one segment of 1’s… and that’s it! ✔️ All test cases passed ⚡ Runtime: 0 ms 📊 Beat 100% in performance This problem was a good reminder that not every solution needs complexity—clarity matters more. Consistency > Complexity 🚀 On to the next challenge! #LeetCode #DailyChallenge #Java #ProblemSolving #CodingJourney #100DaysOfCode #LinkedIn
To view or add a comment, sign in
-
-
🚀 Day 54 of my #100DaysOfCode Journey Today, I solved LeetCode – Sort Array By Parity II Problem Insight: Rearrange the array such that even-indexed positions have even numbers and odd-indexed positions have odd numbers. Approach: • Created a new result array of same size • Used two pointers: evenplace = 0 and oddplace = 1 • Traversed the array once • Placed even numbers at even indices and odd numbers at odd indices • Incremented pointers by 2 to maintain correct positions Time Complexity: O(n) | Space Complexity: O(n) Key Takeaway: Using two pointers for index placement makes the solution clean, efficient, and avoids unnecessary swaps. #DSA #Java #LeetCode #100DaysOfCode #CodingJourney
To view or add a comment, sign in
-
-
Day 83 of #100DaysOfCode Today’s problem: Ugly Number An ugly number is a positive integer whose prime factors are limited to 2, 3, and 5. Approach: Instead of checking all factors, I kept dividing the number by 2, 3, and 5 repeatedly: If the number reduces to 1 → it’s ugly ✅ If something else remains → not ugly ❌ 🔍 Key Insight: Efficient problem-solving is often about reducing complexity, not increasing checks. 🧠 What I learned: How to simplify factor-based problems Importance of repeated division in optimization Writing clean and efficient logic ⚡ Example: 6 → 2 × 3 → Ugly ✅ 14 → includes 7 → Not Ugly ❌ Consistency is slowly building confidence 💪 On to Day 84! #DSA #Java #CodingJourney #ProblemSolving #LeetCode #100DaysOfCode
To view or add a comment, sign in
-
-
🚀 Day 4/30 — LeetCode Challenge Solved the "Palindrome Number" problem on LeetCode using Java. The logic is simple, but the key is choosing the right approach — reversing only half of the number instead of the entire value to avoid unnecessary operations. ✅ Key takeaway: Even simple problems have smarter solutions if you focus on efficiency. Continuing to build consistency and improve problem-solving skills. #LeetCode #Java #Algorithms #ProblemSolving #Consistency
To view or add a comment, sign in
-
-
Day 31/50 🚀 — Reverse Vowels of a String (LeetCode 345) Today’s problem was a great reminder that sometimes the simplest approaches are the most efficient. 🔹 Used the two-pointer technique 🔹 Focused on in-place swapping 🔹 Optimized for both time (O(n)) and space (O(1)) Key takeaway: Instead of overthinking, break the problem into smaller checks—identify vowels, move pointers smartly, and swap only when needed. Clean and efficient 💡 Happy to see this solution performing well: ⚡ Runtime: 2 ms (faster than 99%+) 📦 Space: Decent optimization #Day31 #LeetCode #DSA #Java #CodingJourney #50DaysOfCode #ProblemSolving #SoftwareEngineering
To view or add a comment, sign in
-
-
🚀 LeetCode Challenge 3/50 💡 Approach: Two Pointer (In-Place) The straightforward way uses an extra array — but the problem specifically says no copying! So I used the Two Pointer technique to solve it in-place with a single pass. 🔍 Key Insight: → Use a 'left' pointer to track where the next non-zero element belongs → Traverse with 'right' pointer — place non-zeros at left, then increment → Fill remaining positions with 0s at the end 📈 Complexity: ✅ Time: O(n) — single pass ✅ Space: O(1) — no extra array, truly in-place Sometimes the constraint IS the optimization. Working within limits pushes us to think smarter! 🧠 #LeetCode #DSA #TwoPointer #Java #ADA #PBL2 #LeetCodeChallenge #Day3of50 #CodingJourney #ComputerEngineering #AlgorithmDesign #MoveZeroes
To view or add a comment, sign in
-
-
🚀 Day 8/30 — LeetCode Challenge Solved "Swap Nodes in Pairs" on LeetCode using Java. This problem focuses on "rearranging node connections", not just swapping values — making pointer handling critical. Used a dummy node approach to simplify edge cases and ensure smooth pair-wise swapping. ✅ Key takeaway: Linked list problems are less about logic and more about **precise pointer management** — one wrong link can break the entire structure. #LeetCode #Java #LinkedList #DataStructures #ProblemSolving #Consistency
To view or add a comment, sign in
-
-
🚀100 Days of Code Day-26 LeetCode Practice – Remove Duplicates from Sorted Array Solved a classic problem using the Two Pointer Technique 💡 📌 Problem: Given a sorted array, remove duplicates in-place and return the number of unique elements. 🔍 Key Idea: Since the array is sorted, duplicates are adjacent. Using two pointers helps efficiently overwrite duplicates without extra space. ⚡ Complexity: Time → O(n) Space → O(1) 💻 Clean and optimized approach makes this problem a great example of in-place array manipulation! #LeetCode #Java #DataStructures #CodingPractice #ProblemSolving #100DaysOfCode
To view or add a comment, sign in
-
-
🚀 Day 8 of #100DaysOfCode Solved: Maximum Product of Two Elements in an Array 💻 Today’s problem was all about optimizing logic and thinking smart instead of brute force. Instead of checking every pair, I focused on finding the two largest elements efficiently and used them to compute the result in a single pass 🔥 ✅ Time Complexity: O(n) ✅ Space Complexity: O(1) Small problems like these really sharpen problem-solving skills and reinforce the importance of clean, efficient code. Consistency is key — showing up every day, learning something new, and getting 1% better 💯 #DSA #Java #CodingJourney #LeetCode #ProblemSolving #Consistency #Day8#DSAwithEdSlash
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