## Move matrix elements in given direction and add elements with same value

Given a matrix m[ ][ ] of size n x n consisting of integers and given a character ‘x’ indicating the direction. Value of ‘x’… Read More »

Given a matrix m[ ][ ] of size n x n consisting of integers and given a character ‘x’ indicating the direction. Value of ‘x’… Read More »

Given an array of integers, a number and a maximum value, task is to compute the maximum value that can be obtained from the array… Read More »

Given a string, find the longest substring which is palindrome. For example, if the given string is “forgeeksskeegfor”, the output should be “geeksskeeg”. Prerequisite :… Read More »

Given a sequence of non-negative integers, say a1, a2, …, an. Only following actions can be performed on the given sequence: Subtract 1 from a[i]… Read More »

Given an increasing sequence a[], we need to find the K-th missing contiguous element in the increasing sequence which is not present in the sequence.… Read More »

Euler tour tree (ETT) is a method for representing a rooted tree as a number sequence. When traversing the tree using Depth for search(DFS), insert… Read More »

Given N pieces of chessboard all being ‘white’ and a number of queries Q. There are two types of queries : Update : Given indices… Read More »

Direct Address Table is a data structure that has the capability of mapping records to their corresponding keys using arrays. In direct address tables, records… Read More »

You have given an array which contain 1 to n element, your task is to sort this array in an efficient way and without replace… Read More »

Given N and D, find if it is possible to make two sets from first N natural numbers such that the difference between the sum… Read More »

Given an array of N numbers. Find out the number of pairs i and j such that i < j and Ai and Aj have… Read More »

Problem – Determine largest number in an array of n elements. Value of n is stored at address 2050 and array starts from address 2051.… Read More »

Given two sorted arrays, a[] and b[], task is to find the median of these sorted arrays, in O(log(min(n, m)), when n is the number… Read More »

Given a set of N integers. Find how many subsets of given array have sum between A and B(inclusive). Constraints: 1 ≤ 34 ≤ N,… Read More »

Given an array arr[] of n positive integers. The task is to check if there exist any subset of the array whose bitwise AND is… Read More »