Algorithm Patterns: Sliding WindowThe sliding window pattern is a technique used to reduce the number of nested loops in an algorithm. It’s based on the two-pointers pattern…Feb 1, 2023Feb 1, 2023
Algorithm Patterns: Fast & Slow pointerThe Fast and Slow pointer approach, also known as Hare & Tortoise strategy, is a two-pointers algorithm that traverses the array (or…Jan 29, 2023Jan 29, 2023
Algorithm Patterns: Two PointersThe two-pointer pattern is used when we are dealing with sorted arrays or linked lists and needs to find a set of elements (subset, two…Jan 25, 2023Jan 25, 2023