+ 1

 If an array of numbers is provided, say 93, 64, 47, 64, 49, arrange it in the form of a single number

 If an array of numbers is provided, say 93, 64, 47, 64, 49, arrange it in the form of a single number such that the concluding number is maximum. Output expected in our case will be 9364644947

24th Nov 2017, 2:26 PM
Srivatshan.P.K
Srivatshan.P.K - avatar
5 Answers
+ 2
I didn't understand the question. What should be the output. You should explain it.
24th Nov 2017, 2:33 PM
Uttam
Uttam - avatar
+ 1
output expected in our case will be 9364644947
24th Nov 2017, 2:34 PM
Srivatshan.P.K
Srivatshan.P.K - avatar
+ 1
parse through the array with a for loop like: for(i=0;I<array.length; I++) and then there are 2 ways. 1) I you just need the output start outputting the numbers without new line. 2) if you need to use the number somewhere else, stringify each element and sum them in a variable, which later you can output or parse as int.
24th Nov 2017, 2:59 PM
Dmitrii
Dmitrii - avatar
+ 1
I am typing to sum them up meaning that summing strings "hello"+" world"="helloworld" while summing ints will output 1+2=3
24th Nov 2017, 3:01 PM
Dmitrii
Dmitrii - avatar
0
yes
24th Nov 2017, 4:58 PM
Srivatshan.P.K
Srivatshan.P.K - avatar