I have been an programmer my whole life, and it is my passion. I have done
many problems, I've helped a lot to other coders, and I've made contests
online constest in topcoder, codeforces a lot of times. On top of all of
this, I surround myself with other contesters as friends. Sadly, I recently
Let us assume you have sum S. The possible numbers it is made up are { 1,
2, .., S }.
Now, for every number belonging to the set, you have two options.
1. Subtract currently chosen number from the given set to sum.
2. Choose next number.
The state will be defined as (num, sum), where num is the n
Problem is similar to coin change problem(i.e given an array of coins
denomination , Find number of ways to create N Rupees).So given input
K...fill up array from 1 to K.and use this array and a input to coin change
problem
On Sat, Mar 1, 2014 at 9:55 PM, kumar raja wrote:
> Given an integer ho
Given an integer how many number of ways u can partition the number?
e.g. 3 can be written as 3,1+2,1+1+1
and 4 can be written as 4, 1+1+1+1,2+2,1+3,1+1+2
So for 3 --> 3
for 4 -->5.
The order of the elements in the partition does not matter.
So how to calculate the number of ways to par