+ 8
heres mine... short nd efficient..(version 1) @ Ace ## nice challenge sir (version 2) ## 2 line code https://code.sololearn.com/cbHJwBPGfv82/?ref=app ## input a integer ## https://code.sololearn.com/c6ODM0Tw0bCR/?ref=app
16th Oct 2017, 5:20 AM
sayan chandra
sayan chandra - avatar
15th Oct 2017, 2:21 PM
David Akhihiero
David Akhihiero - avatar
15th Oct 2017, 12:57 PM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
+ 10
bookmarking thread
15th Oct 2017, 12:44 PM
David Akhihiero
David Akhihiero - avatar
+ 9
@VcC what do you propose?
15th Oct 2017, 8:47 PM
David Akhihiero
David Akhihiero - avatar
15th Oct 2017, 3:39 PM
Hiroki Masuda
Hiroki Masuda - avatar
+ 4
just did it with python, itertools, set, index https://code.sololearn.com/cOHP6DbYndUY
16th Oct 2017, 3:42 PM
Oma Falk
Oma Falk - avatar
+ 4
https://code.sololearn.com/wlfpFe6hKJqO/?ref=app added some comments for better understanding
17th Oct 2017, 12:32 AM
Natalia Ložak
Natalia Ložak - avatar
+ 3
Ace, what's supposed to happen when the current permutation is the largest one? What do you want people to do?
16th Oct 2017, 1:48 AM
The Artist Formally Known as Jeremy
The Artist Formally Known as Jeremy - avatar
15th Oct 2017, 4:43 PM
Hiroki Masuda
Hiroki Masuda - avatar
16th Oct 2017, 9:51 AM
Yunfei Duan
Yunfei Duan - avatar
+ 2
Thanks for the challenge. Here's my try... https://code.sololearn.com/czVeev3s3N0I/?ref=app
16th Oct 2017, 10:56 AM
LukArToDo
LukArToDo - avatar
+ 2
have to make
16th Oct 2017, 1:10 PM
Kunal Kumar
Kunal Kumar - avatar
+ 2
for performance one could try - perm last 2 digits - perm last 3 digits .... and find here a good solution it will be a good solution in general
16th Oct 2017, 4:50 PM
Oma Falk
Oma Falk - avatar
+ 2
@VcC Excuse me. Your code is pretty nice, But I think the ability of comparing between integer and character is only a language matter. So I think we need not be proud it so much. I think my code will work "ze..90a" if all to_i methods are removed.
17th Oct 2017, 10:17 AM
Hiroki Masuda
Hiroki Masuda - avatar
+ 1
all these solution have very bad execution times. If you google this you will see these are N time solutions with N = number of digits
15th Oct 2017, 4:12 PM
VcC
VcC - avatar
+ 1
@sayan exactly what i was mentionning. Prefer the longer one easier to read. And i want to keep my king of python oneliners title.
16th Oct 2017, 7:21 AM
VcC
VcC - avatar
+ 1
why it can't be 531 for 153 ???
16th Oct 2017, 2:04 PM
rahul rawat
rahul rawat - avatar
+ 1
#john did you change sth?
17th Oct 2017, 6:30 AM
Oma Falk
Oma Falk - avatar
0
are repeated digits allowed? if that's the case, you have to specify a max.
16th Oct 2017, 9:18 AM
Chan Lap Ping