merge two big Lists in one sorted List (java)


I had an interview today and they gave me:
List A has:
f 
google
gfk
fat
...

List B has:
hgt 
google
koko
fat
ffta
...

They asked me to merge these two list in one sorted List C.
What I told:
I added List B to List A then I made a Set from List A then generate a List from the Set.
he said me the list are big and this method will not be best for performance he told it will be a nlog(n).
Plz any concept How can i approach this issue ?



Get Source Code

  Views 35   Posted on : Sunday, May 19, 2013 8:25:15 PM
Related Tags:




Replies on "merge two big Lists in one sorted List (java)" :

Nobody has replied on this post , be first to post answer.


Post Your Answer/Comment:

Please Login first to post Reply !


Note: Please Put Code into <code></code> block.




Also See: