## Euler tour of Binary Tree

Given a binary tree where each node can have at most two child nodes, the task is to find the Euler tour of the binary… Read More »

Given a binary tree where each node can have at most two child nodes, the task is to find the Euler tour of the binary… Read More »

Prerequisite: Time Complexity Analysis Generally, while doing competitive programming problems on various sites, the most difficult task faced is writing the code under desired complexity… Read More »

Given a 3 x n board, find the number of ways to fill it with 2 x 1 dominoes. Example 1 Following are all the… Read More »

Consider a tree with n nodes and root. You can jump from one node to any other node on the same height a maximum of… Read More »

Given an unsigned number, find the minimum number that could be formed by using the bits of the given unsigned number. Examples: Input : 6… Read More »

Given integers x1, x2, x3……xn, b and m, we are supposed to find the result of ((x1*x2….xn)/b)mod(m). Example 1 : Suppose that we are required… Read More »

Find the number of digits in the nth number constructed by using 6, 1, 4 and 9 as the only digits in the ascending order.… Read More »

Given an array of n positive integers, write a program to find the maximum sum of increasing subsequence from prefix till i-th index and also… Read More »

Prerequisite :Basic knowledge of STL and Sets Data structure. About ordered set Ordered set is a policy based data structure in g++ that keeps the… Read More »

Given a string s we have to find the length of the longest substring of s which contain exactly K distinct vowels. Examples: Input :… Read More »

Given two arrays of same size, we need to convert the first array into another with minimum operations. In an operation, we can either increment… Read More »

Given an array of even number of elements, form groups of 2 using these array elements such that the difference between the group with highest… Read More »

Given an array and a value k. We have to find the maximum number of equal elements possible for the array so that we can… Read More »

Vantieghems Theorem is a necessary and sufficient condition for a number to be prime. It states that for a natural number n to be prime,… Read More »