## Number of ways to go from one point to another in a grid

Given the NxN grid of horizontal and vertical roads. The task is to find out the number of ways that the person can go from… Read More »

- Samsung Semiconductor Institute of Research(SSIR Software) Intern/FTE | Set-2
- Walmart Labs Interview Experience ( On Campus FT + 6 month Internship )
- Java Program to print distinct permutations of a string
- Generating Lyndon words of length n
- Program to calculate the value of nCr Efficiently
- Number of unique pairs in an array
- Count of Numbers in Range where first digit is equal to last digit of the number
- Sum of all Submatrices of a Given Matrix
- Count of Numbers in a Range divisible by m and having digit d in even positions
- Count of sub-sets of size n with total element sum divisible by 3
- Sum of bitwise AND of all submatrices
- Count unordered pairs (i,j) such that product of a[i] and a[j] is power of two
- Number of triangles that can be formed with given N points
- Sum of Bitwise-OR of all Submatrices
- Count the number of special permutations
- Total number of subsets in which the product of the elements is even
- Count of Numbers in a Range where digit d occurs exactly K times
- Sum of (maximum element - minimum element) for all the subsets of an array.
- Count of Numbers in Range where the number does not contain more than K non zero digits
- K length words that can be formed from given characters without repetition
- Permutations of string such that no two vowels are adjacent
- Number of permutations of a string in which all the occurrences of a given character occurs together
- Count Numbers with N digits which consists of odd number of 0's
- Ways to paint N paintings such that adjacent paintings don't have same colors
- Number of trailing zeroes in base 16 representation of N!
- Number of submatrices with OR value 1
- Arrange first N natural numbers such that absolute difference between all adjacent elements > 1
- Deletions of "01" or "10" in binary string to make it free from "01" or "10"
- Number of moves required to guess a permutation.
- Minimum and Maximum number of pairs in m teams of n people

Given the NxN grid of horizontal and vertical roads. The task is to find out the number of ways that the person can go from… Read More »

Given an integer N, the task is to print a good permutation of first N natural numbers. Let’s denote the ith element of the permutation… Read More »

Given a number N(1<=N<=2000)., The task is to find the number strings of size N that can be obtained after using characters from 'a' to… Read More »

Given a string S and a range [L, R]. The task is to find the number of ways in which the sub-string in the range… Read More »

Given an array arr[] of N integers and an integer K. Also given are Q queries which have two numbers L and R. For every… Read More »

Given three integers R, B and W which denote the number of runs, balls and wickets. One can score 0, 1, 2, 3, 6 or… Read More »

Given three arrays A[], B[] and C[] of N integers. We can choose N elements from these array such that for every index i only… Read More »

Given an array arr[] of n positive integers. The task is to find elements arr[i] and arr[j] from the array such that arr[i]Carr[j] is maximum… Read More »

Given two integers N and K. The task is to find the number of good permutations of first N natural numbers. A permutation is called… Read More »

Given 2 integers L and R, the task is to find out the number of integers in the range [L, R] such that they are… Read More »

Given two numbers n and r, the task is to find the value of nPr. nPr represents n permutation r which is calculated as n!/(n-k)!.… Read More »

Given two integer N and M, the task is to find the number of distinct numbers having N 0’s and M 1’s with no leading… Read More »

Given an array arr[], the task is to compute the sum of (max{A} – min{A}) for every non-empty subset A of the array arr[]. Examples:… Read More »

Given an array arr[] of size n whose elements are from the range [1, n]. The task is to find maximum value of |arr[0] –… Read More »

Given an integer N, calculate the number of permutations of A = [1, 2, …, N] which are first decreasing and then increasing. Examples: Input:… Read More »