An array of integers is given and you have to find the largest possible
integer by concatenating all elements:
example:
array: 87 36 52
answer: 875236
array: 87 9 52
answer: 98752
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view
@Shuaib,
You are right, this approach will work! :)
But for each element 'e'
instead of checking whether *|K-e| *exists, *you should check for either
(e+K) or (e-K).*
But here the question is, will the hash map really give o(1) access for such
a large record?
..and is it a good practice to