ASAbirami Sriinabi-blog.hashnode.dev·6d ago · 11 min readDay 6 of My 30-Day DSA Journey — Two Pointers & Array PatternsDay 6 of my DSA journey focuses on the Two Pointers pattern and how it can be used to solve different types of array and string problems efficiently. Today, I solved 5 LeetCode problems: Container Wi00
ASAbirami Sriinabi-blog.hashnode.dev·Sep 5 · 9 min readDay 5 of My 30-Day DSA Journey — Two PointersDay 5 of my 30 Days of DSA with JavaScript journey. Today, I learned and practiced the Two Pointers pattern. The two-pointer technique uses two indexes to traverse an array or string efficiently. Depe00
VVVidit Vatsindsa-decoded.hashnode.dev·Aug 25 · 4 min readLC-18 4SumGiven an array nums of n integers, return an array of all the unique quadruplets [nums[a], nums[b], nums[c], nums[d]] such that: 0 <= a, b, c, d < n a, b, c, and d are distinct. nums[a] + nums[b] +00
SPSneha Poojaryindsamadesimple.hashnode.dev·Aug 20 · 7 min readTwo Pointers Explained: The Proof Nobody Shows YouEvery algorithm blog on the internet tells you how to move two pointers. Virtually none of them prove why you're allowed to move them, or why the exact same structural logic manages unacknowledged byt00
AAnnetinhtml-portfolio.hashnode.dev·Aug 4 · 4 min readMastering the Two Pointers Technique in Python (With Easy Examples)When I first started solving coding problems, I noticed that many array and string questions looked different but could actually be solved using the same approach: Two Pointers. Instead of using neste00
RKRohit Kumharintech-rohit.hashnode.dev·Jul 23 · 38 min readMaster the Two Pointers Pattern in Python (Part 1): Two Sum, Squares of Sorted Array & Remove DuplicatesIntroduction If you've spent time solving coding interview problems, you've probably noticed a common pattern: many array problems seem to invite a nested loop solution. While that approach works, it 10
VVVidit Vatsindsa-decoded.hashnode.dev·Jul 16 · 5 min readLC-15 3Sum ProblemGiven an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0. Notice that the solution set must not conta00
VVVidit Vatsindsa-decoded.hashnode.dev·Jul 16 · 2 min readLC 167 Two Sum II - Input Array Is SortedGiven a 1-indexed array of integers numbers that is already sorted in non-decreasing order, find two numbers such that they add up to a specific target number. Let these two numbers be numbers[index1]00
AAAbstract Algorithmsinabstractalgorithms.hashnode.dev·Jul 2 · 2 min readTwo Pointers TechniqueThe two pointers technique uses two indices to iterate over a data structure (typically an array or a linked list) to solve problems with optimal time complexity. It is commonly used to find pairs in 00
SSowmiyainsowmiya.hashnode.dev·May 7 · 4 min readSolving DSA Series - A word on HashMap and Two PointersHello readers! Welcome to my Solving DSA Problems Series - Part 1 In this piece, we're going to be looking at two of the basic concepts - HashMap and Two Pointers. If these terms doesn't feel familiar00