## Check if the last element of array is even or odd after performing a operation p times

Given is an array of n non-negative integers. The operation is to insert a number in the array which is strictly greater than current sum… Read More »

Given is an array of n non-negative integers. The operation is to insert a number in the array which is strictly greater than current sum… Read More »

An array is called circular if we consider first element as next of last element. Circular arrays are used to implement queue (Refer this and… Read More »

Given an array which represents a number, add 1 to the array. Suppose an array contain elements [1, 2, 3, 4] then the array represents… Read More »

Given an array of n distinct elements, find length of the largest subset such that every pair in the subset is such that the larger… Read More »

There are two players A and B who are interested in playing a game of numbers. In each move a player pick two distinct number,… Read More »

Given an array of N distinct element of at least size 2. A pair (a, b) in an array is defined as ‘a’ is the… Read More »

Given an array of n-elements, we have to find the largest element among them without using any conditional operator like greater than or less than.… Read More »

Talking about representation, trees can be represented in two way: 1) Dynamic Node Representation (Linked Representation). 2) Array Representation (Sequential Representation). We are going to… Read More »

Given two arrays, the task is to calculate the product of max element of first array and min element of second array References : Asked… Read More »

Given an array arr[] containing n integers. The problem is to find the length of the longest strict bitonic subsequence. A subsequence is called strict… Read More »

You are given an array of n-elements you have to find the mean of the array as mean of all consecutive m-elements of array for… Read More »

This is an extended version of subset sum problem. Here we need to find size of maximum size subset whose sum is equal to given… Read More »

Given an array and two numbers x and k. Find the number of different ordered pairs of indexes (i, j) such that a[j] >= a[i]… Read More »

We have briefly discussed sparse table in Range Minimum Query (Square Root Decomposition and Sparse Table) Sparse table concept is used for fast queries on… Read More »

Given two same sized arrays A[] and B[] (both arrays contain distinct elements individually but may have some common elements), task is to form a… Read More »