## 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 »

- Samsung Semiconductor Institute of Research(SSIR Software) Intern/FTE | Set-2
- Walmart Labs Interview Experience ( On Campus FT + 6 month Internship )
- Count number of triplets with product equal to given number with duplicates allowed | Set-2
- Count number of triplets with product equal to given number with duplicates allowed
- Number of ways to reach Nth floor by taking at-most K leaps
- Count unique subsequences of length K
- Program to calculate the value of nCr Efficiently
- Generating Lyndon words of length n
- Count Numbers with N digits which consists of odd number of 0's
- Count ways to distribute m items among n people
- Count unordered pairs (i,j) such that product of a[i] and a[j] is power of two
- Dilworth's Theorem
- Number of handshakes such that a person shakes hands only once
- Number of triangles that can be formed with given N points
- Minimum numbers needed to express every integer below N as a sum
- Number of moves required to guess a permutation.
- Count strings with consonants and vowels at alternate position
- Number of ways to arrange a word such that all vowels occur together
- Find sum of product of number in given series
- Count numbers whose difference with N is equal to XOR with N
- Count ordered pairs of positive numbers such that their sum is S and XOR is K
- Different ways to represent N as sum of K non-zero integers
- Probability that the pieces of a broken stick form a n sided polygon
- Number of permutations of a string in which all the occurrences of a given character occurs together
- Number of unique permutations starting with 1 of a Binary String
- Minimum length of string having all permutation of given string.
- Maximum points of intersection n lines
- Number of ways to form an array with distinct adjacent elements
- Count pairs with Bitwise AND as ODD number
- Ways to form n/2 pairs such that difference of pairs is minimum

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 number n, the task is to find the nth hexadecagonal number. A Hexadecagonal number is class of figurate number and a perfect squares.… Read More »

Given two array of size n and m. The task is to find the number of ways we can merge the given arrays into one… Read More »

We are given an integer N. We need to count the total number of such binary strings of length N such that the number of… Read More »

Given a number n, we need to find the maximum number of times n circles intersect. Examples: Input : n = 2 Output : 2… Read More »

An ordered tree is an oriented tree in which the children of a node are somehow ordered. It is a rooted tree in which an… Read More »

Following are common definition of Binomial Coefficients. A binomial coefficient C(n, k) can be defined as the coefficient of X^k in the expansion of (1… Read More »

Given a number n, find the number of ways to multiply n elements with an associative operation. Examples : Input : 2 Output : 2… Read More »

Given two positive integer n, k. Consider an undirected complete connected graph of n nodes in a complete connected graph. The task is to calculate… Read More »

Sum Rule – If a task can be done in one of ways or one of ways, where none of the set of ways is… Read More »

Given a string str, find count of all palindromic permutations of it. Examples: Input : str = “gfgf” Output : 2 There are two palindromic… Read More »

Given a number n and an array containing 1 to (2n+1) consecutive numbers. Three elements are chosen at random. Find the probability that the elements… Read More »

Given two numbers, n >= 0 and 0 <= k <= n, count the number of derangements with k fixed points. Examples: Input : n… Read More »

Given three integers, A, X and n, the task is to print terms of below binomial expression series. (A+X)n = nC0AnX0 + nC1An-1X1 + nC2An-2X2… Read More »

Given two positive integers N, M. The task is to find the number of strings of length N under the alphabet set of size M… Read More »