[Tutor] recursivity and lists
Mark Lawrence
breamoreboy at yahoo.co.uk
Sat Mar 5 14:42:16 EST 2016
On 05/03/2016 18:46, Danny Yoo wrote:
> On Mar 5, 2016 5:56 AM, "Robert Nanney" <nanney.56 at gmail.com> wrote:
>>
>> Would this meet the requirements?
>
> It's doing a sort, but not in a merging way. Merge sort takes advantage of
> a property of the input lists: the input lists are known to be already
> sorted.
>
> The general sort routine for lists doesn't take much advantage of the
> existing order in the input, whereas in merge sorting, the major point is
> to take advantage of the existing order.
Really? https://en.wikipedia.org/wiki/Timsort
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
More information about the Tutor
mailing list