+ 1

CHALLENGE:: Combination Of Number

Let A, B, and C are three lists which elements are integer. Their length are vary but they are never empty. There are no 2 same elements in a list. But A,B,C can share same element. Create a program that the outputs are lists that every list contain 1 element of A, 1 element of B, and 1 element of C. But, The output list can't contain double number like [1,3,3] List [1,2,3] is same as [3,2,1] or [2,1,3] or [3,1,2] or [1,3,2] or [2,3,1]. ex: A=[1,2], B=[2,3], C=[3,4] out: [1,2,3], [1,2,4], [1,3,4], [2,3,4]

31st Jul 2017, 2:02 AM
Ahmad Fahadh Ilyas
Ahmad Fahadh Ilyas - avatar
9 odpowiedzi
31st Jul 2017, 2:36 AM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
+ 7
@Krishna Teja Yeluripati Why do you always seek out these challenges and do them in a minute or two? You have a serious addiction that you should get consoling for. 😎
31st Jul 2017, 2:43 AM
J.G.
J.G. - avatar
+ 6
So A must be first, then B, then C? So in your ex, 3 could not come first?
31st Jul 2017, 2:44 AM
J.G.
J.G. - avatar
+ 3
@Ahmas Fahadg Ilyas wrote: << @Krishna Wow... using html+css+js... cool ^^ >> Not using html nor css... just pure JS, even for in/output (using prompt() dialog box and document.write() methods, not use of html nor css tabs, no css code at all ;P)
31st Jul 2017, 6:33 AM
visph
visph - avatar
+ 1
@sayan quite close... but there's still a list that has double element if I input A=[1,2], B=[2,3], and C=[3,4].
31st Jul 2017, 5:49 AM
Ahmad Fahadh Ilyas
Ahmad Fahadh Ilyas - avatar
0
@J.G. It can. For example I took 3 from B, then I can't take 3 from C then I must take 4 from C, and from A I can take 1 or 2. So, it gets [3,4,1] or [3,4,2]. But, as I say that [1,2,3] is same as [1,3,2], etc. So, I write [1,3,4] or [2,3,4] instead.
31st Jul 2017, 3:32 AM
Ahmad Fahadh Ilyas
Ahmad Fahadh Ilyas - avatar
0
@Krishna Wow... using html+css+js... cool ^^
31st Jul 2017, 3:38 AM
Ahmad Fahadh Ilyas
Ahmad Fahadh Ilyas - avatar
0
here is mine ahmad... REVISED VERSION https://code.sololearn.com/cLY5X1jObdyd/?ref=app
31st Jul 2017, 5:47 AM
sayan chandra
sayan chandra - avatar
- 1
ha ha chck now again @ Ahmad its revised now##
31st Jul 2017, 6:11 AM
sayan chandra
sayan chandra - avatar