## Count Possible Decodings of a given Digit Sequence

Let 1 represent ‘A’, 2 represents ‘B’, etc. Given a digit sequence, count the number of possible decodings of the given digit sequence. Examples: Input:… Read More »

## Find the maximum path sum between two leaves of a binary tree

Given a binary tree in which each node element contains a number. Find the maximum possible sum from one leaf node to another. The maximum… Read More »

## Smallest subarray with sum greater than a given value

Given an array of integers and a number x, find the smallest subarray with sum greater than the given value. Examples: arr[] = {1, 4,… Read More »

## Count all distinct pairs with difference equal to k

Given an integer array and a positive integer k, count all distinct pairs with difference equal to k. Examples: Input: arr[] = {1, 5, 3,… Read More »

## Find all possible interpretations of an array of digits

Consider a coding system for alphabets to integers where ‘a’ is represented as 1, ‘b’ as 2, .. ‘z’ as 26. Given an array of… Read More »

## [TopTalent.in] Google, Facebook, Amazon, Walmart & PocketGems, All Fighting For Prasoon Mishra

Meet Prasoon, he was just your average guy who studied at IIIT-Hyderabad but today Prasoon Mishra is one of the most well know names across… Read More »

## Largest Rectangular Area in a Histogram | Set 2

Find the largest rectangular area possible in a given histogram where the largest rectangle can be made of a number of contiguous bars. For simplicity,… Read More »

## Largest Rectangular Area in a Histogram | Set 1

Find the largest rectangular area possible in a given histogram where the largest rectangle can be made of a number of contiguous bars. For simplicity,… Read More »

## [TopTalent.in] Exclusive Interview with Ravi Kiran from BITS, Pilani who got placed in Google, Microsoft and Facebook

Even if we were to search around the world, it would be a truly difficult job to find someone like Ravi Kiran. As a Computer… Read More »

## Facebook Interview | Set 1

I am a final year student of IIT Guwahati and the first phase of placements has just finished at our college. I was recruited by… Read More »

## Find subarray with given sum | Set 1 (Nonnegative Numbers)

Given an unsorted array of nonnegative integers, find a continuous subarray which adds to a given number. Examples : Input: arr[] = {1, 4, 20,… Read More »

## Activity Selection Problem | Greedy Algo-1

Greedy is an algorithmic paradigm that builds up a solution piece by piece, always choosing the next piece that offers the most obvious and immediate… Read More »

## Median in a stream of integers (running integers)

Given that integers are read from a data stream. Find median of elements read so for in efficient way. For simplicity assume there are no… Read More »