merging is merging...you can use different methods to do this...
1. I have told you...
2. build BST and print inorder
3. find biggest element, create hash of that size, init table element to
zero (assume zero is not in input array)
traverse each array and put that element into hash table
final
@Manoj: Thanks, but can u tell me the no. of ways in which merging can be
done on 2 arrays.
On Wed, Jan 12, 2011 at 3:06 PM, manoj lalavat wrote:
> one approch is very simple.
>
>
> 1. keep two index on arrays, lets say array1 and array2, which ever index
> has small element put this element to
one approch is very simple.
1. keep two index on arrays, lets say array1 and array2, which ever index
has small element put this element to output array and move index of
smaller element to next position.
repeate above process untill one of the array index get exausted then append
remaining ar
Can anyone help:
*In how many ways can 2 sorted arrays of combined size N be merged?*
--
Thanks and regards,
ARINDAM CHATTERJEE,
Mtech Second Year,
Department of Computer Science and Engineering,
IIT Bombay,
Powai,
Mumbai-400076
Contacts : +919022313724
Living is about making tomorrow better t