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
3
u/oskar_s May 16 '12
For the easy problems, people can solve them however they want. The problems are supposed to be easy after all. When I put up this problem, I had in mind people implementing something like the merge pass of merge-sort, which takes some actual programming, not just using libraries, which is why I put the "make it as efficient as possible".
But again: however people want to solve it is more or less fine.