8 Topics

Member Avatar for
Member Avatar for skyyadav

I have to find the permutation of vector of integers. I need to implement and interleave function vector<vector<int> > interleave(int x , const vector<int> & v); Using interleave we can implement a permute function. vector<vector<int> > permute(size_t n); that returns a vector containing of the first n positive nos. I …

Member Avatar for skyyadav
0
147
Member Avatar for Forte1292

I have the numbers 0-8 so I can represent a state as 012345678 012345687 .... 876543201 876543210 This gives me 40320 ways to represent a state so I have a HashMap of size 40320 and I need a good way to make sure each state only corresponds to 1 key …

Member Avatar for Momerath
0
257
Member Avatar for renyges

Hi. I’m currently doing a project based on permutation and combination and I don’t get it. It should permutated a series of number entered in a textbox and search all that number in ms access database. If the searching number exists in the database, it should list down all the …

Member Avatar for renyges
0
108
Member Avatar for Candace Parker

Good day, people! I have here a code in C that needs improvement. It should list all the permutations of ABCDEF where C and E should be beside each other in any order (CE and EC). I know that I must treat C and E as one so I used …

Member Avatar for WaltP
0
3K
Member Avatar for desert564

pls help me with this the user enters a number n.consider the sequence from 1 through n in ascending order.insert either '+' or'-' between each of the digits so that the resultant sum is zero. for eg: input=7 output= 1+2-3+4-5-6+7=0 1+2-3-4+5+6-7=0 1-2+3+4-5+6-7=0 1-2-3-4-5+6+7=0 however when i programmed it i only …

Member Avatar for NormR1
0
184
Member Avatar for mimah1

ok so far i got this!!! but what i realized is that when i run the ouput 1 2 3 4 5 it gives me the correct output but if i put the value as 3 6 7 8 4 !!! it arranges the number as 3 4 6 7 …

Member Avatar for mimah1
0
159
Member Avatar for davetheant

Hello. I have tried numerous string permutation methods, and they work, but not for what I need. I need to permute a string such that I don't get any reversals: abcd abdc acbd acdb adbc adcb * bacd badc bcad bcda * see how these are reversals of each other? …

Member Avatar for NormR1
0
189
Member Avatar for IndianaRonaldo

I need a little help with algorithm for my code.Given a word "abacus" i have the code to find all its anagrams but i need to include also the words that are smaller in length than the original word. That is, I wanna be able to list ABA,AAB,ACA....ABAC,ABCS....so on. Thanking …

Member Avatar for IndianaRonaldo
0
268

The End.