Skip to content

Category Archives: Algorithms

Given a 0-based n x n integer matrix where grid[x][y] represents the height of the blocks in row x and column y. You can increase… Read More
Given an array, arr[] of size N, and an integer K, the task is to check if it is possible to form a permutation from… Read More
Sorting is defined as the process of arranging a collection of data elements in a specific order, usually in ascending or descending order based on… Read More
Recursion is defined as a process which calls itself directly or indirectly and the corresponding function is called a recursive function. Properties of Recursion: Recursion… Read More
Linear search is defined as the searching algorithm where the list or data set is traversed from one end to find the desired value. Linear… Read More
Given arrays A[] and B[] of size N, the task is to count ways to form an array of size N such that the new… Read More
Invariants and Monovariants are the two properties of mathematics and computer science that describe objects and algorithms. Invariants and mono variants are important mathematical concepts… Read More
Block sort is a sorting algorithm that sorts an array by dividing it into blocks of fixed size, sorting each block individually, and then merging… Read More
Smooth sort is a sorting algorithm that was introduced by Edsger Dijkstra. It is another version of heapsort that is designed to minimize the number… Read More
Given a positive integer array arr[] of size N, the task is to print the longest non-empty subarray whose bitwise AND is maximum in the… Read More
Given a 2D array span[][] of length N which contains spans [L, R] (0 ≤ L ≤ R ≤ 109), the task is to merge… Read More
Given two walls A, B with M, and N hooks respectively. You are also given K ropes. By using one rope you can connect one… Read More
There is a carpet of size A * B [length * breadth]. Given a box of size C * D, the task is to fit… Read More
What is Dijkstra’s Algorithm? Dijkstra’s algorithm is a popular algorithms for solving many single-source shortest path problems having non-negative edge weight in the graphs i.e.,… Read More
Given n stones and array heights[] and Geek is standing at stone 1 and can jump to one of the following: Stone i+1, i+2, …… Read More

Start Your Coding Journey Now!