##
Mersenne Prime
January 3, 2017

Mersenne Prime is a prime number that is one less than a power of two. In other words, any prime is Mersenne Prime if it… Read More »

January 3, 2017

Mersenne Prime is a prime number that is one less than a power of two. In other words, any prime is Mersenne Prime if it… Read More »

Given a maze with obstacles, count number of paths to reach rightmost-bottommost cell from topmost-leftmost cell. A cell in given maze has value -1 if… Read More »

January 2, 2017

Given an array of n integers where each value represents number of chocolates in a packet. Each packet can have variable number of chocolates. There… Read More »

Given an array arr[] of positive integers. The task is to find minimum sum subsequence from the array such that at least one value among… Read More »

January 1, 2017

Given a number n, the task is to find the maximum 0’s between two immediate 1’s in binary representation of given n. Return -1 if… Read More »

Given an array of strings and costs of reversing all strings, we need to sort the array. We cannot move strings in array, only string… Read More »

Given a valid sentence without any spaces between the words and a dictionary of valid English words, find all possible ways to break the sentence… Read More »

December 31, 2016

Given two integer N ans K, the task is to find sum of modulo K of first N natural numbers i.e 1%K + 2%K +… Read More »

December 30, 2016

Given an expression which contains numbers and two operators ‘+’ and ‘*’, we need to find maximum and minimum value which can be obtained by… Read More »

Given a matrix containing lower alphabetical characters only, we need to count number of palindromic paths in given matrix. A path is defined as a… Read More »

December 28, 2016

It is a well established fact that merge sort runs faster than insertion sort. Using asymptotic analysis we can prove that merge sort runs in… Read More »

December 27, 2016

If all decimal numbers are concatenated in a string then we will get a string which looks like string P as shown below. We need… Read More »

December 26, 2016

Given a matrix of N rows and M columns, the task is to find the minimum absolute difference between any of the two adjacent elements… Read More »

Given an array, we need to find maximum sum subarray, removing one element is also allowed to get the maximum sum. Examples: Input : arr[]… Read More »

December 24, 2016

Given a number, the task is to find XOR of count of 0s and count of 1s in binary representation of a given number. Examples:… Read More »