Hi,
Can anyone give the algo to generate all possible interleavings of two arrays (better if its in C or Java)
E.g. A1[] = {a,b};B1[] = {c,d};
# Results = (2+2)!/(2! .2!) = 6
abcdacbdacdbcabdcadbcdab
-- Mohammed Abdul Muqsith ImranDepartment of Computer Science and Engineering,Indian Institute
http://www.qbyte.org/puzzles/p003s.html
On 4/23/06, Venkatesh Dayalan [EMAIL PROTECTED] wrote:
Two unknowns x and y are to be found by two mathematicians M1 and M2.
I give the Product(x * y) to M1 and Sum(x + y) to M2.
M1 doesn't know the value of S and M2 doesn't know the value of P.
Now both
Wht do u think this grp is for? Doing ur school assignments?. I think the moderator such people shud be banned and also silly algos which can easily be found by searching shud not be discussed ... only serious alogs whose solns are not found on net or new algos shud be dicussed here.
On 4/12/06,
I think it it max sub-sequence problem which is discussed on this link : http://discuss.fogcreek.com/techinterview/default.asp?cmd=showixPost=3052
On 4/5/06, Vijendra Singh [EMAIL PROTECTED] wrote:
I dont get it, if its just the subset, then just get the sum of all positive nos. may be you