Skip to content

Category Archives: Algorithms

Given an array arr[] of n integers. Modify the array such that every element is at least as large as the previous element. This can… Read More
Given a sorted array arr[] containing N pairs [A, B], where A is the position in X axis and B is the value on that… Read More
Given a list of points on the 2-D plane arr[][], a given point target, and an integer K. The task is to find K closest… Read More
Given integers N, K, X and Y. The task is to find the maximum possible N-digit number in K steps starting from 0. Using the… Read More
Given an array arr, the task is to replace each array element by the maximum of K next and K previous elements. Example: Input: arr[]… Read More
Given an array arr[]. The array contains numbers from 0 to N-1 only, where N is the size of arr[]. The task is to modify… Read More
Given a positive integer N. The task is to find Nth term of the series 3, 7, 19, 55, 163, ….. Examples: Input: N =… Read More
Given two vectors, a and b of different sizes, where array a has m number of elements and array b has n number of elements.… Read More
A 2D vector also known as vector of vectors is a vector in which each element is a vector on its own. In other words,… Read More
Given string S of size N, the task is to find the sum of the alphabet value of each character in the given string. Examples:… Read More
Given a n x n matrix. The problem is to sort the matrix row-wise and column wise.Examples:   Input : mat[][] = { {4, 1, 3},… Read More
Given a n x n matrix. The problem is to sort the matrix row-wise and column wise.Examples:   Input : mat[][] = { {4, 1, 3},… Read More
Given a n x n matrix. The problem is to sort the matrix row-wise and column wise.Examples:   Input : mat[][] = { {4, 1, 3},… Read More
Given a n x n matrix. The problem is to sort the matrix row-wise and column wise.Examples:   Input : mat[][] = { {4, 1, 3},… Read More
Given a n x n matrix. The problem is to sort the matrix row-wise and column wise.Examples:   Input : mat[][] = { {4, 1, 3},… Read More

Start Your Coding Journey Now!