🚀 Day 10/100 – #100DaysOfDSA Double digits! 🎯 Today was all about mastering Linked List traversal and pointer manipulation. 🔹 Problems Solved: 1. Middle of the Linked List 2. Reverse Linked List 💡 Key Learnings: 👉 Problem 1: Middle of the Linked List Used Two Pointer Technique (Slow & Fast pointers) Slow moves 1 step, Fast moves 2 steps When fast reaches end → slow is at the middle ✅ O(n) Time ✅ O(1) Space ✅ Efficient single-pass solution 👉 Problem 2: Reverse Linked List Iterative approach using three pointers: prev, current, next Reverse links one by one 👉 Core Idea: Change direction of next pointer at each step ✅ O(n) Time ✅ O(1) Space 🔥 What I learned today: Linked Lists are all about pointer control — once you master that, many problems become easier. The slow & fast pointer technique is 🔥 — super useful pattern! Day 10 done ✅ Staying consistent 💪 #100DaysOfCode #DSA #LinkedList #ProblemSolving #CodingJourney #JavaScript #TechGrowth #SoftwareEngineer #LearningInPublic #Developers
Mastering Linked List Traversal and Pointer Manipulation
More Relevant Posts
-
🚀 DSA Challenge – Multiple Pointers Pattern 💡 Problem Given a sorted array and a target average, determine if there exists a pair whose average equals the target. 🔍 Examples averagePair([1,2,3], 2.5) ➝ true averagePair([1,3,3,5,6,7,10,12,19], 8) ➝ true averagePair([], 4) ➝ false ⚡ Approach • Initialize two pointers → one at the start, one at the end • Calculate the average of the two values • Move pointers based on comparison with the target • Achieve O(N) time and O(1) space complexity 🧠 Key Learning Instead of checking all possible pairs (O(N²)), leveraging the sorted nature of the array with the two-pointer technique makes the solution highly efficient. 🔥 Consistency is key — showing up daily to improve problem-solving skills and build stronger fundamentals. 👉 How would you approach this problem? Any edge cases or optimizations you’d consider? 🔗 GitHub: https://lnkd.in/gurx_UXW #DSA #JavaScript #CodingChallenge #100DaysOfCode #ProblemSolving #FrontendDeveloper #FullStackDeveloper #LearningInPublic #TechJourney
To view or add a comment, sign in
-
-
🚀 LeetCode Challenge Update: 27/128 Just wrapped up “Container With Most Water” 💧 — a classic two-pointer problem that really tests how you think about optimization. At first glance, it feels like a brute-force problem… but the real magic is in reducing time complexity from O(n²) to O(n) using a smarter approach. 🔑 Key takeaway: Sometimes the best solution isn’t about checking everything — it’s about moving intelligently and eliminating unnecessary work. 📈 Progress: 27/128 Consistency > Motivation #LeetCode #128DaysOfCode #CodingJourney #DSA #JavaScript #ProblemSolving
To view or add a comment, sign in
-
-
🚀 Day 13/100 – #100DaysOfDSA Today was all about efficient deletion in Linked Lists and handling edge cases in a single pass 🔗 🔹 Problems Solved: 1. Remove Nth Node From End of List 2. Remove Duplicates from Sorted List 💡 Key Learnings: 👉 Problem 1: Remove Nth Node From End Used Two Pointer Technique (Fast & Slow) Move fast pointer n steps ahead Then move both pointers until fast reaches the end Slow will be just before the node to delete 👉 Key Trick: Use a dummy node to handle edge cases (like removing head) ✅ One-pass solution ✅ O(n) Time ✅ O(1) Space 👉 Problem 2: Remove Duplicates from Sorted List Since list is sorted → duplicates are adjacent Traverse and compare current node with next Skip duplicate nodes ✅ O(n) Time ✅ O(1) Space 🔥 What I learned today: Using dummy nodes + two pointers makes Linked List problems much cleaner and avoids edge-case bugs. Patterns are repeating, confidence is growing 📈 Day 13 done ✅ Let’s keep pushing 💪 #100DaysOfCode #DSA #LinkedList #ProblemSolving #CodingJourney #JavaScript #TechGrowth #SoftwareEngineer #LearningInPublic #Developers
To view or add a comment, sign in
-
Day 82 of #100DaysOfCode Today I learned Hashing and Frequency Maps, a powerful concept in DSA. Covered: • Counting elements efficiently • Solving problems using key-value pairs • Optimizing time complexity #DSA #JavaScript #CodingInterview #LearningInPublic
To view or add a comment, sign in
-
Day 1 of improving my problem-solving skills 🚀 Tried solving Two Sum today. Logic was clear… implementation humbled me 😅 Got stuck not because of approach, but something basic — hashmap syntax. 👉 Today’s learning: Using a hashmap (Map in JS) reduces time complexity from O(n²) → O(n) Knowing syntax matters as much as knowing the idea Most used Map functions: set(key, value) get(key) has(key) Small steps, consistent effort 📈 #DSA #JavaScript #Fullstack #LearnInPublic
To view or add a comment, sign in
-
-
🚀 Day 12/100 – #100DaysOfDSA Today was all about handling edge cases and smart traversal in Linked Lists 🔗 🔹 Problems Solved: 1. Intersection of Two Linked Lists 2. Remove Linked List Elements 💡 Key Learnings: 👉 Problem 1: Intersection of Two Linked Lists Used a HashSet approach Store nodes of one list and check in the other ✅ O(n + m) Time ❌ O(n) Space 💡 Optimization Insight: Can be solved using Two Pointer Technique with O(1) space Traverse both lists → switch heads → they meet at intersection 👉 Problem 2: Remove Linked List Elements Traverse the list and remove nodes matching given value Use a dummy node to handle edge cases (like removing head) 👉 Key Idea: Always keep track of previous node while deleting ✅ O(n) Time ✅ O(1) Space 🔥 What I learned today: Handling edge cases (like deleting head nodes or null cases) is just as important as solving the problem itself. Also learned that there’s always a more optimal solution worth exploring 👀 Day 12 done ✅ Let’s keep going strong 💪 #100DaysOfCode #DSA #LinkedList #ProblemSolving #CodingJourney #JavaScript #TechGrowth #SoftwareEngineer #LearningInPublic #Developers
To view or add a comment, sign in
-
🚀 #DSA_Journey #Day_125 Today I solved a different kind of problem — Counter (Closure concept). No arrays, no pointers… just pure JavaScript fundamentals. The idea is simple: 👉 Return a function that remembers its previous state Each call updates and returns the value — without using global variables. What makes this powerful: 👉 The function carries its own memory (closure) This isn’t about DSA patterns it’s about understanding how JavaScript actually works under the hood. What clicked today: 👉 If you don’t understand closures, you’re just guessing in JS 📌 Complexity Time Complexity: O(1) per call Space Complexity: O(1) 🙏 Acknowledgment Grateful to Akshay Saini 🚀 and the NamasteDev.com team for building strong core fundamentals. Not just coding. Understanding. #JavaScript #Closures #Functions #ProblemSolving #LearningInPublic #Consistency #SoftwareDevelopment #NamasteDev
To view or add a comment, sign in
-
-
Day 5 — #100DaysOfCode Built a Random Color Generator using JavaScript today. ✅ With a simple click, the background color changes dynamically—making the concept of DOM manipulation and event handling more practical and visual. Projects like these make learning more engaging and help connect concepts more clearly. Building, learning, and improving step by step. 🚀 #100DaysOfCode #JavaScript #WebDevelopment #FrontendDevelopment #Projects #Consistency
To view or add a comment, sign in
-
🚀 DSA Day 18: Shifting Pointers & Linking Logic! 🔗🧠 Today was less about the theory and more about the logic. Implementing get, insert, and delete really forced me to see the code as a physical chain. The big "Aha!" moment: Realizing the power of O(1) insertions. In an array, adding to the front is a chore; here, you just move the head pointer and you’re done. ⚡️ It’s definitely a game of precision, though. If you don't handle the pointers in the right order—like making the "handshake" before breaking the old link—you lose your entire list to the void. 🕳️ Feeling way more confident with pointer logic now. On to Day 19! ➡️ #Day18 #JavaScript #DSA #LinkedList #CodingJourney #DataStructures #LearningInPublic #WebDev #LogicBuilding
To view or add a comment, sign in
-
-
𝐃𝐚𝐲 𝟔/𝟑𝟎 🚀 𝐓𝐨𝐝𝐚𝐲 𝐈 𝐥𝐞𝐚𝐫𝐧𝐞𝐝: Generating random values and working with strings in JavaScript 𝐁𝐮𝐢𝐥𝐭: A password generator that creates random passwords using letters, numbers, and symbols 𝐊𝐞𝐲 𝐭𝐚𝐤𝐞𝐚𝐰𝐚𝐲: Used loops and random indexing to build a dynamic string generator #30DaysChallenge #WebDev #LearningInPublic
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