🚀 𝗗𝗮𝘆 𝟭𝟲/𝟯𝟬 — 𝗗𝗦𝗔 𝗖𝗵𝗮𝗹𝗹𝗲𝗻𝗴𝗲 Day 16, and linked lists are officially testing my patience… and my pointer accuracy There’s something humbling about working with nodes — one small mistake and suddenly your list disappears into the void. But once the logic clicks, it’s actually pretty satisfying. Today was all about careful pointer manipulation and thinking a few steps ahead instead of just moving forward blindly. 🔎 𝗗𝗮𝘆 𝟭𝟲 𝗙𝗼𝗰𝘂𝘀 • Managing multiple pointers safely • Handling edge cases • Solved: ✅ Merge Two Sorted Lists ✅ Remove Nth Node From End ✅ Palindrome Linked List Big takeaway: with linked lists, confidence is good… but double-checking your pointers is better Still showing up. Still improving. On to Day 17 #DSA #Python #LeetCode #Consistency #SoftwareEngineering #ProblemSolving
Linked List Challenges: Pointer Manipulation and Edge Cases
More Relevant Posts
-
🐍 Your Date Column isn't a Date It just looks like one. 2026-01-15 stored as a string will pass every visual check — and silently break every time-based analysis you run. Ask these before you trust a date column: ✅ What dtype is it actually? ✅ How was it parsed? → Is 01/02/2026 January 2nd or February 1st? ✅ What timezone is it in? → UTC? Local server time? → Two timestamps can look identical and be 5 hours apart. ✅ What does a missing date mean? → Event didn't happen? Wasn't recorded? Pipeline failed? 👉 Always validate with two lines of code — it can save hours of debugging. What's the messiest date column you've encountered? 👇 #DataAnalytics #Python #AnalyticsThinking
To view or add a comment, sign in
-
-
Day 4/100: Mastering the Two-Pointer Shuffle 🚀 💡 How I solved it: I used the Two-Pointer Technique to move all zeros to the end of an array while maintaining the original order of other elements. *Pointer i: Tracks the next position for a non-zero element. *Pointer j: Scans through the entire array. *The Swap: Every time j finds a non-zero value, it swaps with i. This effectively "bubbles" all zeros to the back in a single pass. 🧠 Key Takeaway: *Efficiency: Achieved O(n) time complexity and O(1) space (In-place modification). *Relative Order: This method ensures that non-zero numbers stay in their original sequence without needing extra memory or hash maps. The logic is getting sharper every day! 📈 #DSA #Python #100DaysOfCode #ProblemSolving #StriverA2Z
To view or add a comment, sign in
-
-
🚀 #100DaysOfCode – Day 37 🔍 LeetCode 387 – First Unique Character in a String Today’s problem was about finding the first non-repeating character in a string and returning its index. 🧠 Problem Summary Given a string s, return the index of the first unique character. If no such character exists, return -1. 💡 Approach 1️⃣ Create a frequency dictionary to count occurrences of each character. 2️⃣ Traverse the string again and return the first index where frequency == 1. 3️⃣ If none found → return -1. ⏱️ Complexity 🕒 Time Complexity: O(n) 📦 Space Complexity: O(1) (since only lowercase letters) 🔥 Key Learning Two-pass hashmap technique Importance of frequency counting Clean and readable implementation Consistency > Motivation 💪. #Day37 #LeetCode #Python #DSA #CodingJourney #ProblemSolving #100DaysOfCode
To view or add a comment, sign in
-
-
🚀 Day 51 of #100DaysOfCode 📌 LeetCode 567 – Permutation in String 🔍 Problem Understanding We are given two strings s1 and s2. The task is to check whether any permutation of s1 exists as a substring in s2. In simple terms: If we rearrange the characters of s1, can we find that arrangement inside s2? 💡 Approach / Intuition The efficient way to solve this problem is using the Sliding Window Technique. Steps of thinking: 1️⃣ Count the frequency of characters in s1. 2️⃣ Create a window in s2 with the same size as s1. 3️⃣ Move the window one character at a time across s2. 4️⃣ For each window, compare the character frequencies with s1. 5️⃣ If the frequencies match, it means a permutation of s1 exists in s2. ⚡ Key Concepts Used Sliding Window Hash Map / Character Frequency Count String Traversal 📊 Complexity ⏱ Time Complexity: O(n) 💾 Space Complexity: O(1) (since character set is fixed) #Day51 #100DaysOfCode #LeetCode #DSA #Python #CodingJourney #ProblemSolving #SlidingWindow
To view or add a comment, sign in
-
-
🚀 Day 39/100 – LeetCode Challenge Today’s problem: 406. Queue Reconstruction by Height This problem focuses on applying a Greedy approach with sorting to reconstruct a queue based on height and positional constraints. 🔍 Key Insight: Sort people by height in descending order and k value in ascending order, then insert each person at their respective index. 💡 What I learned: Importance of sorting strategy in greedy problems How insertion at a specific index can maintain constraints Thinking from the perspective of "who affects whom" (taller vs shorter) 🧠 Approach: Sort the array → (-height, k) Insert each person at index k 💻 Code (Python): class Solution: def reconstructQueue(self, people): people.sort(key=lambda x: (-x[0], x[1])) queue = [] for p in people: queue.insert(p[1], p) return queue ⏱️ Time Complexity: O(n²) Consistency is the key — showing up every day and improving step by step. #Day39 #LeetCode #100DaysOfCode #DSA #Python #CodingChallenge #GreedyAlgorithm #SoftwareDevelopment
To view or add a comment, sign in
-
-
Day 3 / 100 🚀 Solved “Reverse Integer” — a problem that looks simple but actually tests how carefully you handle edge cases. At first, reversing digits feels straightforward. But the real challenge is handling 32-bit overflow without using extra space. 💡 Key learning: Before updating the result, always check if multiplying by 10 will exceed the allowed range. Core idea: rev * 10 + digit must stay within [-2³¹, 2³¹ - 1] Highlights: • Time Complexity: O(log n) • Space Complexity: O(1) • Correctly handles negative numbers and overflow This problem reinforced a critical habit: Don’t just make the logic work — validate boundary conditions. #100DaysOfCode #LeetCode #DSA #Python #ProblemSolving #CodingInterview
To view or add a comment, sign in
-
-
🚀 Day 13 of Consistency | #75DaysLeetCodeChallenge 🧠 Today’s Problem : Container With Most Water (#11) 💡 Key Learning: This problem strengthens understanding of the two-pointer optimization technique, where maximizing area depends on width & minimum height. ⚡ Approach: Use two pointers → left (l) at start & right (r) at end →Calculate area = (r - l) * min(height[l], height[r]) →Update max area →Move the pointer with smaller height (to try increasing area) 🧠 Why this works: Eliminates brute force O(n²) → optimized to O(n) Greedy movement ensures better area possibilities No extra space → O(1) 🔥 Result : ✔️ Runtime: 57 ms (Beats 60.95%) 📈 Problems like this build strong intuition for optimization & greedy thinking. Consistency is compounding. Keep going. 💪 #Day13 #LeetCode #DSA #CodingJourney #100DaysOfCode #Python #TwoPointers #Consistency
To view or add a comment, sign in
-
-
Built a simple Linked List from scratch in Python to strengthen core DSA fundamentals. Key operations implemented: • Insert at beginning • Insert at end • Insert at specific position Clean and minimal implementation 👇 💡 Tips & insights from this implementation: • Always handle edge cases first (especially position == 0 and empty list) • Use position - 1 when inserting → you need the previous node, not the exact index • Traversal safety matters → always check temp is None to avoid crashes • Keep functions single responsibility (traverse_to_position makes insertion cleaner and reusable) • Don’t break links accidentally → Always connect new_node.next before changing temp.next • Naming matters → insert_behind can be clearer as insert_end • Remember: Linked Lists are about pointer management, not index access like arrays Simple idea, powerful foundation #DSA #SoftwareEngineering
To view or add a comment, sign in
-
-
🚀 𝗗𝗮𝘆 𝟭𝟵/𝟯𝟬 — 𝗗𝗦𝗔 𝗖𝗵𝗮𝗹𝗹𝗲𝗻𝗴𝗲 Day 19 and today’s focus was on Binary Search Trees (BST). What makes BST problems interesting is how their ordered structure can simplify searching and comparisons. Once the properties of a BST are clear, many operations become much more intuitive. Today was about understanding how to navigate and use that structure effectively. 🔎 𝗗𝗮𝘆 𝟭𝟵 𝗙𝗼𝗰𝘂𝘀 • Understanding BST properties • Practicing efficient tree traversal for search operations • Solved: ✅ Search in a Binary Search Tree ✅ Insert into a Binary Search Tree ✅ Lowest Common Ancestor of a BST One thing this challenge keeps reinforcing: the right data structure often makes the solution much simpler. Still learning. Still improving. On to Day 20 #DSA #Python #LeetCode #Consistency #SoftwareEngineering #ProblemSolving
To view or add a comment, sign in
-
60 Days of Problem Solving Challenge - Day 27 👉 Today’s Problem: Vertical Tree Traversal (Binary Tree) The goal was to print the vertical order traversal of a binary tree from the leftmost vertical line to the rightmost. 💡 Approach / Logic: Used Level Order Traversal (BFS) with a queue. Assigned each node a Horizontal Distance (HD) from the root: Root → HD = 0 Left child → HD − 1 Right child → HD + 1 Stored nodes in a hashmap/dictionary where: HD → list of node values BFS ensures nodes in the same vertical line appear in level order. Finally, sorted the horizontal distances and printed values from leftmost to rightmost column. This problem reinforced concepts of Binary Trees, BFS traversal, and mapping nodes using horizontal distance. 📈 Progress Update 🔥 Current Streak: 27 Days 🎯 Goal: 60 Days of Consistent Problem Solving #60DaysOfCode #GeeksforGeeks #DSA #BinaryTree #ProblemSolving #Python #CodingJourney #Consistency
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