Blog

Monotonic Stacks in Python

In this article, we’ll explore monotonic stacks, how they work, and how to implement them in Python. 1. What is a Monotonic Stack? A Stack is a collection of elements that follow the ‘Last In First Out’ (LIFO) principle. It can be easily implemented either through an array or a linked list. A Monotonic Stack is a data

Monotonic Stacks in Python Read More »

Blog

Fast and Slow Pointers

In this article, we’ll explore the concept of Fast and Slow Pointers, a fundamental pattern used to solve complex problems. 1. What are Fast and Slow Pointers? Fast and Slow Pointers is a technique used to traverse a linked list or an array by using two pointers that move at different speeds. The Fast Pointer moves two steps at

Fast and Slow Pointers Read More »

Blog

Sliding Window vs Two Pointers

In this article, We will explore the Sliding Window vs Two Pointers Approach, how it works, and which one is best to solve problems. 1. What is the Two Pointers Technique? Two Pointers is a technique used to solve problems. It involves searching, sorting, or iterating through data like arrays or strings. It works using

Sliding Window vs Two Pointers Read More »

Blog

Two Pointers Approach

In this article, we will explore the Two Pointers approach, how it works, and how you can use it to solve problems. 1. What are Two Pointers? Two Pointers is a technique used to solve problems. It involves traversing or searching through data structures such as arrays, strings, or linked lists. The basic idea behind

Two Pointers Approach Read More »

Blog
Scroll to Top