Tag: two_pointers
Remove Nth Node From End of List
Date: 3/2/2024Tags:algorithmsleetcodetwo_pointers linked_listThe journal entry details a solution using the two-pointer technique to remove the nth node from the end of a linked list, handling edge cases and traversing the list to skip the targeted node efficiently, ensuring the removal with just one pass through the list.
Maximum SubArray
Date: 2/29/2024Tags:algorithmsleetcodetwo_pointersUsing a two-pointer technique with `startI` and `endI`, the code efficiently finds the maximum sum of a subarray while excluding subarrays with negative sums, ultimately returning the maximum sum of any contiguous subarray.
Container With Most Water
Date: 2/16/2024Tags:algorithmsleetcodetwo_pointersThe journal entry titled "Container With Most Water" discusses the solution to a problem of finding the maximum volume of water that can be contained between two vertical lines represented by an array of heights, using a code that iterates through the array from both ends.