+ 20

[ASSIGNMENT] Arrange numbers

Input any large number and arrange it digits in ascending order with alternate odd and even number if pair is not possible then print only in ascending Eg. Input 12361 output 12361//alternate odd even ascending input 748291 output 127498 input 111112 output 1211111 input 12111311 output 12111113

12th Dec 2017, 4:52 AM
Fire Feathers
Fire Feathers - avatar
18 Answers
+ 18
Good code everyone 👍
13th Dec 2017, 3:12 PM
Sintsand
Sintsand - avatar
12th Dec 2017, 7:17 AM
Rahul Shaikh
Rahul Shaikh - avatar
13th Dec 2017, 7:54 AM
LukArToDo
LukArToDo - avatar
+ 8
well well well.
12th Dec 2017, 5:03 PM
Vyshnav Vishnu
Vyshnav Vishnu - avatar
14th Dec 2017, 3:17 PM
AZTECCO
AZTECCO - avatar
+ 7
in ruby: with random number of 8 digits: https://code.sololearn.com/ctIjdEt79XM9 with user input and simplified code for length of arrays: https://code.sololearn.com/cDUa7M852RB5/
13th Dec 2017, 8:44 AM
bedawang
bedawang - avatar
+ 7
https://code.sololearn.com/cq5mKYD3xw24/?ref=app
23rd Jun 2018, 5:19 PM
Muhammad Hasan
Muhammad Hasan - avatar
+ 6
https://code.sololearn.com/cT8glPBbAYyb/ My try :) :) my first code here so I hope you like it (even it is very simple)
12th Dec 2017, 8:01 PM
Karol Gašparík
Karol Gašparík - avatar
+ 6
@karol you can print the output as a number by for z in final: print(z,end="") give it a try☺
12th Dec 2017, 8:06 PM
Rahul Shaikh
Rahul Shaikh - avatar
+ 5
Great
12th Dec 2017, 9:36 AM
Fire Feathers
Fire Feathers - avatar
+ 5
thanks
12th Dec 2017, 10:10 AM
Rahul Shaikh
Rahul Shaikh - avatar
+ 5
@christof try to input pls
13th Dec 2017, 3:10 AM
Fire Feathers
Fire Feathers - avatar
+ 4
@rahul Thank you... that look much better :)
12th Dec 2017, 8:18 PM
Karol Gašparík
Karol Gašparík - avatar
13th Dec 2017, 8:23 AM
Othmane Lh
Othmane Lh - avatar
+ 4
Great efforts
13th Dec 2017, 3:07 PM
Fire Feathers
Fire Feathers - avatar
13th Dec 2017, 7:23 AM
Mickel
Mickel - avatar
+ 1
https://code.sololearn.com/c63oKOc69SkB/?ref=app
15th Dec 2017, 10:49 AM
srivatsa desai
srivatsa desai - avatar
0
I know it's a bit late, but here's mine https://code.sololearn.com/cP8eFF4EZ9xM/?ref=app
16th Dec 2017, 3:23 PM
JaredM