## Minimum flips to make all 1s in left and 0s in right | Set 1 (Using Bitmask)

Given a binary array, we can flip all the 1 are in the left part and all the 0 to the right part.Calculate the minimum… Read More »

## Minimum Word Break

Given a string s, break s such that every substring of the partition can be found in the dictionary. Return the minimum break needed. Examples:… Read More »

## Find if there is a rectangle in binary matrix with corners as 1

There is a given binary matrix, we need to find if there exists any rectangle or square in the given matrix whose all four corners… Read More »

## Median of Stream of Running Integers using STL

Given that integers are being read from a data stream. Find median of all the elements read so far starting from the first integer till… Read More »

## Calculate maximum value using ‘+’ or ‘*’ sign between two numbers in a string

Given a string of numbers, the task is to find the maximum value from the string, you can add a ‘+’ or ‘*’ sign between… Read More »

## Rearrange a string in sorted order followed by the integer sum

Given a string containing uppercase alphabets and integer digits (from 0 to 9), the task is to print the alphabets in the order followed by… Read More »

## Decode a string recursively encoded as count followed by substring

An encoded string (s) is given, the task is to decode it. The pattern in which the strings are encoded is as follows. <count>[sub_str] ==>… Read More »

## Largest sum subarray with at-least k numbers

Given an array, find the subarray (containing at least k numbers) which has the largest sum. Examples: Input : arr[] = {-4, -2, 1, -3}… Read More »

## Convert Ternary Expression to a Binary Tree

Given a string that contains ternary expressions. The expressions may be nested, task is convert the given ternary expression to a binary Tree. Examples: Input… Read More »

## How to prepare for Facebook Hacker Cup?

Facebook hacker cup is an annual algorithmic programming contest organized by Facebook. Be it students, professionals or experts it attracts numerous programming enthusiasts from all… Read More »

## Largest subset whose all elements are Fibonacci numbers

Given an array with positive number the task is that we find largest subset from array that contain elements which are Fibonacci numbers. Asked in… Read More »

## Multiply Large Numbers represented as Strings

Given two numbers as strings. The numbers may be very large (may not fit in long long int), the task is to find product of… Read More »

## Given two unsorted arrays, find all pairs whose sum is x

Given two unsorted arrays of distinct elements, the task is to find all pairs from both arrays whose sum is equal to x. Examples: Input… Read More »

## Find all triplets with zero sum

Given an array of distinct elements. The task is to find triplets in array whose sum is zero. Examples : Input : arr[] = {0,… Read More »

## Boggle | Set 2 (Using Trie)

Given a dictionary, a method to do lookup in dictionary and a M x N board where every cell has one character. Find all possible… Read More »