TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Charith Liyanagamage
NA
148
0
Algorithem
Sep 7 2008 10:52 AM
Hello...!
I need to develop an algorithem(like a recursive function).
What I want is...if n=4, then I must print all the possibilities that can be built.
like this.....
ex:- if n=4
then answer should be
4
3 , 1
2 , 2
2 , 1, 1
1 , 1, 1, 1
as you can see all above combinations reprsents 4 when they add up(3+1=4, 2+2=4....).
As I know this is related to integer partioning.I went through some algorithems bt I couldnt overcome with a solution.Can anyone give me a solution to generate above output.?It doesnt matter you cant develop a recursive solution.if it's a recursive then it's better.
this is the site I refered:
http://www.site.uottawa.ca/~ivan/F49-int-part.pdf
Reply
Answers (
1
)
What is the significance of DLL file in C#?
Calender spreadsheet