🚀 Day 20/100 – LeetCode Challenge ✅ Problem Solved: Single Number II Today’s problem pushed me to think beyond basic approaches and dive deeper into bit manipulation. The challenge was to find the element that appears only once while every other element appears three times. Instead of using extra memory, I used a clever bitwise technique to track counts using two variables. This approach efficiently filters out elements appearing three times and keeps only the unique one. 💡 Key Learning: Bit manipulation can replace counting mechanisms Tracking states using bits is a powerful technique Optimized solutions often avoid extra space completely ⚡ Complexity: Time: O(n) Space: O(1) Day by day, building stronger problem-solving skills and consistency 💪 #Day20 #100DaysOfCode #LeetCode #DSA #Cpp #CodingJourney #ProblemSolving #BitManipulation
LeetCode Challenge: Single Number II Solution with Bit Manipulation
More Relevant Posts
-
🚀 Day 22/100 – LeetCode Challenge ✅ Problem Solved: Sum of Unique Elements Today’s problem was simple yet a good reminder of how important frequency counting is in array-based questions. The task was to find the sum of elements that appear exactly once. I used a frequency map to count occurrences and then added only those elements that appeared once. 💡 Key Learning: Frequency counting is a fundamental technique in DSA Even easy problems help strengthen core concepts Clean and simple logic often leads to efficient solutions ⚡ Complexity: Time: O(n) Space: O(n) Small steps every day lead to big improvements over time 🚀 #Day22 #100DaysOfCode #LeetCode #DSA #Cpp #CodingJourney #ProblemSolving
To view or add a comment, sign in
-
-
Day 29 – LeetCode Journey 🚀 Solved Two Sum II – Input Array Is Sorted using the Two Pointer technique, leveraging the sorted nature of the array for an optimal solution. 🔹 Time Complexity: O(n) 🔹 Runtime: 2 ms (Beats 96.37%) 🔹 Memory Usage: 48.58 MB This problem is a great reminder that recognizing patterns (like sorted arrays) can significantly reduce complexity and improve efficiency. Small optimizations, big impact 📈 Staying consistent and sharpening problem-solving skills every day. #LeetCode #DSA #ProblemSolving #CodingJourney #SoftwareEngineering #Consistency #Learning
To view or add a comment, sign in
-
-
🚀 Day 27/100 – LeetCode Challenge ✅ Problem Solved: Remove Duplicates from Sorted Array Today’s problem was a classic example of using the two-pointer technique. The goal was to remove duplicates from a sorted array in-place while maintaining the order of elements. I used two pointers to track unique elements and overwrite duplicates efficiently without using extra space. 💡 Key Learning: Two-pointer technique is very effective for array problems In-place operations help reduce space complexity Understanding problem constraints leads to optimal solutions ⚡ Complexity: Time: O(n) Space: O(1) Consistency is building confidence step by step 🚀 #Day27 #100DaysOfCode #LeetCode #DSA #Cpp #CodingJourney #TwoPointers #ProblemSolving
To view or add a comment, sign in
-
-
🚀 Day 26/100 – LeetCode Challenge ✅ Problem Solved: Valid Perfect Square Today’s problem was about checking whether a number is a perfect square without using any built-in functions like sqrt. I solved it using Binary Search, which helped efficiently determine whether there exists an integer whose square equals the given number. 💡 Key Learning: Binary Search can be applied beyond arrays Handling large numbers requires careful use of data types Avoiding overflow is important in mathematical problems ⚡ Complexity: Time: O(log n) Space: O(1) Learning to apply fundamentals in different ways every day 🚀 #Day26 #100DaysOfCode #LeetCode #DSA #Cpp #CodingJourney #BinarySearch #ProblemSolving
To view or add a comment, sign in
-
-
Day 30 – LeetCode Journey 🚀 Solved Trapping Rain Water — a classic Hard problem that tests deep understanding of two-pointer optimization and space efficiency. Instead of brute force or extra space, applied an optimized two-pointer approach to compute trapped water in a single pass. 🔹 Time Complexity: O(n) 🔹 Runtime: 0 ms (Beats 100%) ⚡ 🔹 Memory Usage: Optimized This problem reinforced how powerful pointer techniques can be when combined with the right intuition. 30 days of consistency, learning, and growth — and just getting started 💪 #Day30 #LeetCode #DSA #ProblemSolving #CodingJourney #SoftwareEngineering #Consistency #KeepLearning
To view or add a comment, sign in
-
-
🚀 Day 26/100 — LeetCode Challenge Today's problem: Search in Rotated Sorted Array II 🧠 Concept: Binary Search with Edge Cases 💡 Key Idea: Duplicates can make it difficult to identify the sorted half. In such cases, shrink the search space from both ends. ⚡ Time Complexity: O(log n) average, O(n) worst case 📂 Solutions Repository https://lnkd.in/gkFh2mPZ A great example of how edge cases can complicate an otherwise straightforward approach. #100DaysOfLeetCode #DSA #LeetCode #CodingChallenge #SoftwareEngineering
To view or add a comment, sign in
-
Just crossed 100 problems solved on LeetCode. Not impressive by itself—but what matters is consistency. Most of these came from sticking to fundamentals like arrays, two pointers, and basic problem patterns instead of jumping around randomly. Current focus: • Strengthening problem-solving patterns • Reducing time per problem • Moving from Easy → Medium consistently Still a long way to go. Next target: 200 with stronger Medium coverage. If you're grinding LeetCode too, focus less on quantity and more on pattern recognition—it compounds faster. #LeetCode #DSA #CodingJourney #ProblemSolving #SoftwareEngineering
To view or add a comment, sign in
-
-
Most people understand cycle detection… but get stuck when asked to find where the cycle starts. 🚀 Day 19/100 — LeetCode Challenge Solved Linked List Cycle II 💡 Step 1: Detect cycle -Use slow & fast pointers -If they meet → cycle exists 💡 Step 2: Find starting node -Move fast back to head -Move both one step at a time -Where they meet again → start of cycle 👉 This part is pure intuition + math 🧠 Time Complexity: O(n) 💾 Space Complexity: O(1) 💡 What I learned: Detecting a cycle is easy. Finding its starting point is where real understanding begins. This is one of those problems where you either memorize… or truly understand. Have you ever understood why this works? #LeetCode #DSA #100DaysOfCode #Cpp #LinkedList #TwoPointers #CodingJourney
To view or add a comment, sign in
-
-
🧠 Day 32/75: Solving for the "End" from the "Beginning" Linked Lists can be tricky because you can't access elements by index. So, how do you remove the Nth element from the back without knowing the total length? Today’s LeetCode session was a deep dive into Pointer Logic. By maintaining a specific distance between two pointers, I was able to identify and delete the target node in a single traversal. Current Progress: 📅 32 Days Consecutive 🎯 Focus: Advanced Linked List Patterns ⚡ Result: 100% Beats Runtime Another day, another problem solved. The second month is off to a strong start! 💻🔥 #Consistency #100DaysOfCode #DSA #CodingJourney #JavaDeveloper #TechGrowth #LeetCodeChallenge #LinkedInLearning
To view or add a comment, sign in
-
-
Day 31 – LeetCode Journey 🚀 Solved 4Sum, extending the classic 2-pointer + sorting approach to handle quadruplets efficiently while avoiding duplicates. 🔹 Time Complexity: O(n³) 🔹 Runtime: 21 ms (Beats 42.04%) 🔹 Memory Usage: 45.86 MB (Beats 53.18%) This problem highlights how scaling from 2Sum → 3Sum → 4Sum requires careful handling of duplicates, pointers, and optimization trade-offs. Not the fastest yet — but a solid step in mastering multi-pointer patterns and improving further 💡 Consistency continues 📈 #Day31 #LeetCode #DSA #ProblemSolving #CodingJourney #SoftwareEngineering #KeepLearning
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