##
Find maximum length Snake sequence
June 2, 2016

Given a grid of numbers, find maximum length Snake sequence and print it. If multiple snake sequences exists with the maximum length, print any one… Read More »

June 2, 2016

Given a grid of numbers, find maximum length Snake sequence and print it. If multiple snake sequences exists with the maximum length, print any one… Read More »

May 30, 2016

Given time taken by n tasks. Find the minimum time needed to finish the tasks such that skipping of tasks is allowed, but can not… Read More »

May 29, 2016

In share trading, a buyer buys shares and sells on future date. Given stock price of n days, the trader is allowed to make at… Read More »

April 16, 2016

Given two strings, find the length of longest subsequence present in both of them. Examples: LCS for input Sequences “ABCDGH” and “AEDFHR” is “ADH” of… Read More »

March 21, 2016

There are ‘p’ balls of type P, ‘q’ balls of type Q and ‘r’ balls of type R. Using the balls we want to create… Read More »

March 9, 2016

Given a number n, count number of ways to fill a n x 4 grid using 1 x 4 tiles.

March 5, 2016

Given N jobs where every job is represented by following three elements of it. Start Time Finish Time Profit or Value Associated Find the maximum… Read More »

February 8, 2016

Given an array arr[] of n numbers and a number K, find the number of subsets of arr[] having XOR of elements as K Examples:… Read More »

Permutation refers to the process of arranging all the members of a given set to form a sequence. The number of permutations on a set… Read More »

February 3, 2016

The longest Zig-Zag subsequence problem is to find length of the longest subsequence of given sequence such that all elements of this are alternating. If… Read More »

December 10, 2015

Given three numbers n, r and p, compute value of nCr mod p. Example: Input: n = 10, r = 2, p = 13 Output:… Read More »

December 8, 2015

Given a set of integers, the task is to divide it into two sets S1 and S2 such that the absolute difference between their sums… Read More »

November 18, 2015

A Derangement is a permutation of n elements, such that no element appears in its original position. For example, a derangement of {0, 1, 2,… Read More »

November 16, 2015

Given a “m x n” matrix, count number of paths to reach bottom right from top left with maximum k turns allowed. What is a… Read More »

November 9, 2015

Given two numbers n and k where n represents number of elements in a set, find number of ways to partition the set into k… Read More »