r/dailyprogrammer • u/oskar_s • May 16 '12
[5/16/2012] Challenge #53 [easy]
Write a function that given two sorted lists, returns a list whith the two lists merged together into one sorted list.
So, for instance, for inputs [1,5,7,8] and [2,3,4,7,9] it should return [1,2,3,4,5,7,7,8,9].
Try and make your code as efficient as possible.
19
Upvotes
View all comments
Show parent comment
1
u/bs_detector May 17 '12 edited May 17 '12
I had this, sans LINQ, but yours is better. My code runs a million times in 600 ms on a Mac Book Pro i7 2.67 Ghz. Pretty tight.