DIR Return Create A Forum - Home
---------------------------------------------------------
techsuns
HTML https://techsuns.createaforum.com
---------------------------------------------------------
*****************************************************
DIR Return to: Puzzles && Algorithms
*****************************************************
#Post#: 54--------------------------------------------------
Problem
By: ravu Date: August 24, 2012, 4:44 am
---------------------------------------------------------
Given an array of integers, devise an algorithm to find the
largest number possible from a concatenation of the integers in
the array. Each number must be used exactly once.
ex. An input array: [1, 3, 2, 4]
returns: 4,321
order of #'s: [4, 3, 2, 1]
ex. 2: [59, 58, 5, 1, 2]
returns: 5,958,521
order of #'s: [59, 58, 5, 2, 1]
ex. 3: [54, 5, 55, 6, 7, 56, 120, 560, 540, 505, 9, 57, 0, 1,
45, 65]
returns: 976,655,756,560,555,545,405,054,512,010
order of #'s: [9, 7, 6, 65, 57, 56, 560, 55, 5, 54, 540,
505, 45, 120, 1, 0]
#Post#: 58--------------------------------------------------
Re: Problem
By: kpr29 Date: August 25, 2012, 5:10 am
---------------------------------------------------------
@Ravu: Nice Problem......... But can u explain the solution
about what sorting is done....... and reverse contention all
those things......
#Post#: 262--------------------------------------------------
Re: Problem
By: satya Date: November 28, 2012, 11:36 pm
---------------------------------------------------------
@ravu: can u provide the answer for this??? ;D
#Post#: 289--------------------------------------------------
Re: Problem
By: kpr29 Date: November 30, 2012, 10:58 pm
---------------------------------------------------------
@Satti: Instead of asking for anwsers in each post.......... U
post what u feel is the answer, then it will be interesting for
one who post to give correct one. If u want only answer u can
search in internet.
kp.
*****************************************************