As the placement season is back so are we to help you ace the interview. We have selected some most commonly asked and must do… Read More

Featured Articles

Given a Binary tree, the task is to print its all level in sorted order Examples: Input : 7 / \ 6 5 / \… Read More

Given an array of n integers, find the sum of xor of all pairs of numbers in the array. Examples : Input : arr[] =… Read More

Given a number n, find out number of Reflexive Relation on a set of first n natural numbers {1, 2, ..n}.Examples : Input : n… Read More

Consider an array A[] of integers and following two types of queries. update(l, r, x) : Adds x to all values from A[l] to A[r]… Read More

Given a n x n strictly sorted matrix and a value x. The problem is to count the elements smaller than or equal to x… Read More

Given N, count the number of ways to express N as sum of 1, 3 and 4. Examples: Input : N = 4 Output :… Read More

Given a string s that may have duplicate characters. Find out the lexicographic rank of s. s may consist of lower as well as upper… Read More

Given a positive integer n. The problem is to print numbers in the range 1 to n having first and last bits as the only… Read More

Given an array of Integers and an Integer value k, find out k sub-arrays(may be overlapping), which have k maximum sums. Examples: Input : arr… Read More

Given two numbers, fact and n, find the largest power of n that divides fact! (Factorial of fact). Examples: Input : fact = 5, n… Read More

Given a sequence, find the length of the longest palindromic subsequence in it. Examples: Input : abbaab Output : 4 Input : geeksforgeeks Output :… Read More

The statement using namespace std is generally considered bad practice. The alternative to this statement is to specify the namespace to which the identifier belongs… Read More

Given an array arr[] and an integer k, we need to print k maximum elements of given array. The elements should printed in the order… Read More

giveGiven an array of N integers with duplicates allowed. All elements are ranked from 1 to N in ascending order if they are distinct. If… Read More