if (4,2) is given as input we have to list all the 4 digit binary numbers containing two 1s ie, 1100,1010,1001.... etc. i need a java program to implement this. can anyone help???
madhu.garimilla -1 Newbie Poster
Recommended Answers
Jump to PostOne second thought the 4C2 operation doesn't make sense! Ah the things my mind comes up with when it knows not what to do lol
Wow very nifty solution Iamthwee! For the most part it looks rather complex... and so I'm not really sure how the solution is found... …
Jump to PostPermutation… sigh. Well I suppose the easiest approach would be to keep track of all the generated permutations in a vector (or perhaps hash table) and so when a new permutation is generated you simply compare it will the preexisting ones. Should it not be found then it is a …
Jump to Post> can anyone suggest me on how to remove the duplicate sequences from being displayed/generated
By using a better algorithm like 'Heap Permute'. See this. Though the solution is in C++, with almost no effort, you can port it to Java.
Jump to PostAmazing. Do you guys just know this stuff, and sit down and logically work your way through it? or do you have manuals and texts from years of experience that you refer to in order to get the algorithms and apis and methods and things like that?
Jump to Post> Ah, pardon me, I misread the question, my bad.
Now there is an understatement.
All 22 Replies
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster
PoovenM 30 Junior Poster
jwenting 1,905 duckman Team Colleague

iamthwee

iamthwee
PoovenM 30 Junior Poster

iamthwee
PoovenM 30 Junior Poster

iamthwee
PoovenM 30 Junior Poster

iamthwee

iamthwee
madhu.garimilla -1 Newbie Poster
madhu.garimilla -1 Newbie Poster
PoovenM 30 Junior Poster
madhu.garimilla -1 Newbie Poster

iamthwee
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
iamthwee commented: retarded... -2
Aia commented: Are you saying that as you look at the mirror? +6

iamthwee
~s.o.s~ commented: It will, when you STFU... -5
no1zson 24 Posting Whiz in Training
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

iamthwee
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.