🚀 Day 32/100 Continuing My DSA Journey Worked on some core Linked List problems today: 🔹 Reverse Linked List 🔹 Remove Linked List Elements 🔹 Remove Duplicates from Sorted List What I focused on: ✅ Solving without using a dummy node ✅ Handling edge cases like deleting the head ✅ Managing prev and current pointers correctly Key learning 💡 👉 In linked list deletion, move prev only when you are NOT deleting. Also understood how avoiding a dummy node makes you think more carefully about pointer handling and edge cases. Step by step, building strong fundamentals. 🔥 #DSA #LinkedList #Java #LeetCode #CodingJourney #Consistency
Linked List Problems and Learning Java on LeetCode
More Relevant Posts
-
🚀 DSA Journey Update: 7/75 Solved another problem today: Product of Array Except Self 💡 Key Idea: Used prefix (left) and suffix (right) products to build the answer without using division and in O(n) time. 🔍 Example: Input: [1,2,3,4] Output: [24,12,8,6] ⚡ Learning: Optimized approach using two passes Space optimization by reusing the same array Stronger understanding of prefix/suffix patterns Step by step progress… consistency matters more than speed 🔥 #DSA #Java #LeetCode #CodingJourney #100DaysOfCode #ProblemSolving
To view or add a comment, sign in
-
-
Day 20 of my DSA journey 🚀 Today’s problem: Delete Alternate Characters 🔹 Approach: Iterated through the string and picked characters at even indices while skipping the odd ones. Used StringBuilder for efficient string construction. 🔹 Key Learning: Simple problems help strengthen fundamentals like indexing and string handling, which are very important for bigger problems. 🔹 Time Complexity: O(n) 🔹 Space Complexity: O(n) Consistency is the real game changer. Small steps every day! 💪 #Day20 #DSA #Java #CodingJourney #ProblemSolving #Consistency
To view or add a comment, sign in
-
-
🔥 Day 53 of #100DaysOfCode Solved – Number of Steps to Reduce a Number to Zero 🔍 What I did: Simulated the process by repeatedly checking whether the number is even or odd. If even, divided by 2; if odd, subtracted 1 — counting each step until the number became zero. 💡 Key Learning: Strengthened understanding of conditional logic (even vs odd) Practiced step-by-step simulation problems Learned a cleaner approach using bit manipulation (num & 1) ⚡ Result: ✅ Accepted ⚡ Efficient and clean solution 🎯 Takeaway: Breaking a problem into simple rules and simulating them step-by-step can make even tricky problems easy to solve. #Day53 #LeetCode #Java #ProblemSolving #CodingJourney #100DaysOfCode #DSA
To view or add a comment, sign in
-
-
Today’s progress in my DSA journey 🚀 I focused on Bit Manipulation and learned some really powerful operations: 🔹 Update i-th bit – How to change a specific bit to 0 or 1 efficiently 🔹 Clear i-th bit – Removing a bit at a given position using bit masking 🔹 Clear range of bits (i to j) – Learned how to reset multiple bits in a range with a single operation 🔹 Clear last i bits – Useful trick to zero out bits from the least significant side Bit manipulation feels tricky at first, but once the logic clicks, it becomes super efficient and elegant 💡 Consistency is the goal. Small steps every day. #DSA #Java #BitManipulation #CodingJourney #LearningInPublic
To view or add a comment, sign in
-
🚀 Day 56 of #DSA ✅ Solved: Find Minimum in Rotated Sorted Array (LeetCode 153) Today’s problem was about finding the minimum element in a rotated sorted array using Binary Search. 💡 Key Insight: The minimum element lies at the pivot point, and we can locate it by comparing middle element with the right boundary. ⚙️ Approach: - Use binary search - Identify the sorted half - Narrow down to the minimum element ⚡ Time Complexity: O(log n) 📚 Key Learning: Understanding patterns like rotated arrays makes Binary Search even more powerful. Step by step improving 🚀 #Day56 #BinarySearch #LeetCode #Java #DSA #CodingJourney #100DaysOfCode #Tech
To view or add a comment, sign in
-
-
🔥 Day 58 of DSA Journey Solved the classic 3Sum (LeetCode 15) problem today. 💡 Key Learnings: Sorting simplifies the problem structure Fix one element and apply the two-pointer approach Handling duplicates correctly is crucial to avoid redundant results ⏱️ Complexity: Time: O(n²) Space: O(1) (excluding output) 📊 Result: Runtime: 33 ms (Beats 73.75%) Strengthened understanding of two-pointer pattern This problem reinforced an important pattern: 👉 Reduce 3Sum → 2Sum using two pointers On to the next challenge 🚀 #DSA #LeetCode #CodingJourney #Java #ProblemSolving #Consistency
To view or add a comment, sign in
-
-
Day 17 of #100DaysOfCode Solved Plus One (Easy) today. A simple but important problem that reinforces handling edge cases carefully. Key Idea: Traverse from the last digit, handle carry properly. Approach: Start from the end of the array If digit < 9 → increment and return If digit == 9 → make it 0 and carry forward If all digits are 9 → create new array with leading 1 Learning: Even the easiest problems test your attention to edge cases. Consistency > Complexity. #LeetCode #DSA #CodingJourney #Java #ProblemSolving #Consistency
To view or add a comment, sign in
-
-
🚀 Day 81 of #LeetCode Journey Solved: Subarray Sums Divisible by K Today’s problem helped me understand the power of Prefix Sum + HashMap optimization. 💡 Key Learning: Instead of checking all subarrays (O(n²)), we can use modulo + frequency map to reduce it to O(n). If two prefix sums have the same remainder, the subarray between them is divisible by K. 🧠 Concepts used: Prefix Sum Modulo Arithmetic HashMap (Frequency Count) ✅ Result: Accepted ✔️ Consistency is building confidence day by day 💪 #Day81 #DSA #Java #LeetCode #CodingJourney #ProblemSolving
To view or add a comment, sign in
-
-
Day 22/100 — LeetCode Today’s problem: Happy Number 😊 At first, it looked like a simple math problem… but it turned out to be about patterns and repetition. 🔍 What I learned: Break a number into digits using % 10 and / 10 Square each digit and keep adding Repeat the process until: You reach 1 → Happy Number ✅ Or it starts repeating → Not Happy ❌ 🧠 Key Insight: This problem is actually about cycle detection — if a number repeats, it will never reach 1. ⚡ Simple Example: 19 → 82 → 68 → 100 → 1 ✅ 💡 Takeaway: Sometimes problems that look like math are really about loops and patterns. Small steps every day → Big improvement 🚀 #Day22 #100DaysOfCode #LeetCode #Java #DSA #CodingJourney
To view or add a comment, sign in
-
-
DSA Practice Update Today I solved: #876 – Middle of the Linked List Learned how to efficiently find the middle node of a linked list using the fast and slow pointer approach. Understood how moving one pointer twice as fast as the other helps identify the middle element in a single traversal. Key Learnings: • Fast and slow pointer technique • Efficient traversal of linked lists • Solving problems in O(n) time with constant space This problem strengthened my understanding of pointer-based techniques, which are very useful in linked list problems. Continuing to stay consistent and improve problem-solving skills step by step. #DSA #LeetCode #CodingJourney #Java #SoftwareDevelopment #PlacementPreparation
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