Saturday, May 31, 2014

Friday, May 30, 2014

Thursday, May 29, 2014

Integer Knapsack

A knapsack has max capacity C and there are n items each with weight wi, and value vi. Maximize the value in the knapsack without exceeding its max capacity

Wednesday, May 28, 2014

Jump stairs

There ia stair with n steps. You can climb either one step or two steps at a time. How many different ways there are to climb the stair?

Tuesday, May 27, 2014

Monday, May 26, 2014

Dice

Given a dice count how many ways to get sum s

Sunday, May 25, 2014

Palindromes

Given a string find the minimum number of characters to be inserted for converting the string into a palindrome.

Saturday, May 24, 2014

Bridge matching

N cities are on the northern bank of a river and n cities are on the southern bank. You can build a bridge only between cities with the same number

Friday, May 23, 2014

Sum subset

Given an array of integers of size n, partition it in such a way that the two subsets have equal sum s.

Thursday, May 22, 2014

Partition set

Partition a multiset S of positive integers into two subsets S1 and S2, such that the sum of the numbers in S1 equals the sum of the numbers in S2

Wednesday, May 21, 2014

Segment partition

Given a segment of integer length n, cut into different integer parts in such a way to maximize the product of the lengths of all parts

Tuesday, May 20, 2014

Cutting a rod

Given a rod of length n and a vector of prices for different lengths, cut the rod for maximizing the gain

Monday, May 19, 2014

Max matrix 0/1

Given a matrix consisting only of 0 and 1 find the maximum size square submatrix with all 1.

Sunday, May 18, 2014

Matrix parentization

Given a set of m matrices find the most efficient way of multiplying them

Saturday, May 17, 2014

Max submatrix

Given a matrix of size n x n fine the maximum sum rectangle

Friday, May 16, 2014

BST and dynamic programming

Given a binary search tree, find the size of the largest independent set of nodes

Thursday, May 15, 2014

Games of coins

A set of coins are aligned and two players can pick one coin from each side in turn. Maximize the value of the coins picked by the first player

Wednesday, May 14, 2014

Maximum value contiguous subsequence

Given an array of real numbers, find a contiguous subsequence with max sum S

Tuesday, May 13, 2014

Stock prices

Given an histogram array of unsigned integers encoding the price of a stock title during previous year, compute the area for the largest rectangle contained in this histogram

Monday, May 12, 2014

Ship battle

Given a matrix M and an array V match the array in the matrix

Sunday, May 11, 2014

Scheduling

Given n jobs, each one with a processing time t1 a profidt p1 and a deadline di maximize the profit

Saturday, May 10, 2014

Boolean parentesization

Given a boolean expression of AND, OR, XOR, TRUE, FALSE find the number of ways to parenthesize and evaluate to true

Friday, May 9, 2014

Balanced partition

Given an array of integers between 0 and M divide the integers into two sets such that the difference of their sum is minimized