🚀 𝗗𝗮𝘆 𝟴/𝟯𝟬 — 𝗗𝗦𝗔 𝗖𝗵𝗮𝗹𝗹𝗲𝗻𝗴𝗲 Starting Week 2 of this 30-day DSA journey, and it already feels like the focus is shifting from just solving problems to recognizing patterns faster. Today was about working with the two-pointer approach — learning how moving pointers from different directions can simplify problems that might otherwise need extra space or nested loops. 🔎 𝗗𝗮𝘆 𝟴 𝗙𝗼𝗰𝘂𝘀 • Understanding two-pointer techniques • Practicing cleaner comparisons and boundary logic • Solved: ✅ Two Sum II (Input Array Is Sorted) ✅ Valid Palindrome II ✅ Merge Sorted Array Still a lot to learn, but the thinking process is definitely getting sharper day by day. On to Day 9 💪 #DSA #Python #LeetCode #LearningInPublic #Consistency #SoftwareEngineering #ProblemSolving
Day 8: Two-Pointer Approach in DSA
More Relevant Posts
-
Day x of building in public 🔨(I don't remember tbh) Today felt like two different worlds colliding — 📚 College: Selection Sort, Bubble Sort, Insertion Sort ⚡ Home: CRUD operations on FastAPI One is about understanding HOW computers think. The other is about building things people can actually use. Both matter. Most people learn sorting algorithms and forget them. I'm learning them AND shipping code the same day. That gap — between knowing and doing — is where most people stay stuck. Not me. Not anymore. #100DaysOfCode #FastAPI #Python #DSA #BuildingInPublic #SoftwareEngineering
To view or add a comment, sign in
-
-
🚀 𝗗𝗮𝘆 𝟭𝟬/𝟯𝟬 — 𝗗𝗦𝗔 𝗖𝗵𝗮𝗹𝗹𝗲𝗻𝗴𝗲 Day 10 already — and this journey is starting to feel less about solving individual problems and more about recognizing patterns and choosing the right approach faster. Today’s focus was on sliding window techniques — understanding how adjusting a window dynamically can help track subarrays or substrings efficiently without rechecking everything from scratch. 🔎 𝗗𝗮𝘆 𝟭𝟬 𝗙𝗼𝗰𝘂𝘀 • Learning sliding window logic • Practicing dynamic range tracking • Solved: ✅ Maximum Average Subarray I ✅ Longest Substring Without Repeating Characters ✅ Permutation in String Still learning, still improving — one problem at a time. On to Day 11 💪 #DSA #Python #LeetCode #LearningInPublic #Consistency #SoftwareEngineering #ProblemSolving
To view or add a comment, sign in
-
Day 51 Not every day is about solving new problems. Some days are for understanding deeper. #Day51 🧩 297. Serialize and Deserialize Binary Tree Today was mostly revision. • Focused on understanding the core pattern behind serialization • Tried to internalize how recursion rebuilds the tree • Deserialization still needs more clarity and repetition • Realized this problem isn’t about code — it’s about structure I’m not rushing it. Some concepts need multiple passes before they truly stick. Consistency means revisiting, not just moving forward. #LeetCode #DSA #Python #BinaryTree #Recursion #LearningInPublic #Consistency
To view or add a comment, sign in
-
-
🚀 Day-66 of #100DaysOfCode 📊 NumPy Practice – Image Matrix Manipulation Today I simulated a grayscale image using NumPy and performed a simple brightness adjustment. 🔹 Concepts Practiced ✔ Random matrix generation ✔ Array arithmetic operations ✔ Pixel value clipping using np.clip() ✔ Understanding image data as matrices 🔹 Key Learning Images in computer vision are essentially NumPy matrices, where each element represents a pixel intensity. NumPy makes it easy to manipulate these values efficiently. Exploring how NumPy connects with image processing and computer vision 📸✨ #Python #NumPy #DataScience #ComputerVision #MachineLearning #100DaysOfCode
To view or add a comment, sign in
-
-
🚀 Solved Today’s GeeksforGeeks POTD: Subarrays with First Element Minimum using Python 🐍 Problem: Given an integer array, count the number of subarrays where the first element is the minimum element of that subarray. Approach: Solved this problem using the Next Smaller Element technique with a stack: • For each element, found the next smaller element to its right • All subarrays starting at that index and ending before the next smaller element remain valid • Counted these ranges to compute the total number of valid subarrays efficiently This problem helped reinforce my understanding of: ✔️ Monotonic stack patterns ✔️ Next smaller element concept ✔️ Optimizing subarray problems from O(n²) to O(n) 💡 Time Complexity: O(n) 💡 Space Complexity: O(n) Consistent practice with DSA problems continues to improve my problem-solving skills and algorithmic thinking 💪 #geekstreak60 #npci #geeksforgeeks #dsa #python #algorithms #monotonicstack #codingjourney
To view or add a comment, sign in
-
-
Solved an interesting array problem using prefix sums + hash maps 🚀 This solution efficiently finds the longest subarray based on a comparison condition (arr[i] > k) by converting the problem into a prefix sum balance and tracking first occurrences with a hashmap. ✅ O(n) time complexity ✅ Smart use of prefix sums ✅ Great example of turning a complex condition into a simple math problem Always fun when problem-solving meets optimization! 💻📊 #Python #DataStructures #Algorithms #CodingInterview #ProblemSolving #100DaysOfCode
To view or add a comment, sign in
-
-
🔥 Day 30 of #100DaysOfCode 📌 LeetCode 26 – Remove Duplicates from Sorted Array Today’s problem focused on in-place array manipulation and strengthening the two-pointer technique. 🧠 Problem Summary Given a sorted array, remove duplicates such that each unique element appears only once. Return the count of unique elements (k). Important: Do it in-place with O(1) extra space. 💡 Key Insight Because the array is already sorted, duplicates are always adjacent. So instead of checking all elements repeatedly: 👉 Compare current element with previous one. 👉 If different → place it at the next unique index. This is where the Two Pointer Approach shines: Pointer i → traverses array Pointer k → tracks position of next unique element 📊 Complexity ⏱ Time: O(n) 📦 Space: O(1) Consistency > Motivation 30 Days Done. Still going strong 💪 #Day30 #LeetCode #DSA #100DaysOfCode #Python #CodingJourney
To view or add a comment, sign in
-
-
“What if you could actually see how algorithms think in real-time?” 👀 Just built an interactive Pathfinding Visualizer using Python that demonstrates how algorithms make decisions step-by-step in real-time. This project focuses on visualizing how the A* (A-Star) Algorithm finds the shortest path between two points by evaluating both distance traveled and estimated distance to the goal. 🔹 Built using Python & Tkinter 🔹 Real-time algorithm simulation 🔹 Grid-based dynamic pathfinding 🔹 Visual representation of node exploration 🔹 Educational tool for understanding DSA concepts This helped me deepen my understanding of how search algorithms work internally beyond just theoretical implementation. Always open to feedback and suggestions from the developer community! 🔗 GitHub: github.com/ersachin01 #Python #DataStructures #Algorithms #DSA #Pathfinding #AStarAlgorithm #DeveloperJourney #BuildInPublic #OpenSource #ComputerScience #CodingLife #TechProject
To view or add a comment, sign in
-
🚀 Day 51/200 – LeetCode Challenge Today’s problem: Island Perimeter 🌊🏝️ Focused on understanding how to efficiently calculate boundaries in a grid using a simple yet powerful observation: 👉 Each land cell contributes 4 edges 👉 Shared edges reduce the total perimeter 🔍 Key Takeaways: Learned to optimize by avoiding unnecessary checks Strengthened grid traversal and pattern recognition skills Practiced writing clean and efficient code 💡 Result: ✅ Accepted ⚡ Runtime: 38 ms 📊 Beat ~65% of submissions Consistency is the real game changer. Small improvements every day lead to big results over time. #Day51 #200DaysOfCode #LeetCode #Python #DataStructures #Algorithms #CodingJourney #Consistency
To view or add a comment, sign in
-
-
feb-21-26 LeetCode 762 – Prime Number of Set Bits in Binary Representation Solved today’s problem focused on bit manipulation and prime checking! 🔹 Problem: Given two integers left and right, count how many numbers in that range have a prime number of set bits (1s) in their binary representation. 💡 Approach: Iterate through each number in the range. Count set bits using bitwise operations (& and right shift). Check whether the count of set bits is a prime number. Keep track of valid cases. 🧠 Concepts Used: Bit Manipulation Prime Number Checking Mathematical Optimization Simple problem on the surface, but a great way to strengthen understanding of binary representation and efficient computation. Consistency + Daily Practice = Growth 📈🔥 #LeetCode #BitManipulation #PrimeNumbers #Python #CodingPractice #ProblemSolving
To view or add a comment, sign in
-
Explore related topics
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