]> git.ipfire.org Git - thirdparty/git.git/commit - Makefile
add mergesort() for linked lists
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>
Sat, 31 Mar 2012 22:10:11 +0000 (00:10 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 11 Apr 2012 15:50:53 +0000 (08:50 -0700)
commit0db71e0fa94c1857f98890928098e8f4c8ac6f26
tree0095038b4c0b0c9d643380f479cb17db1dcd14a6
parent828ea97de486c1693d6e4f2c7347acb50235a85d
add mergesort() for linked lists

This adds a generic bottom-up mergesort implementation for singly linked
lists.  It was inspired by Simon Tatham's webpage on the topic[1], but
not so much by his implementation -- for no good reason, really, just a
case of NIH.

[1] http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
.gitignore
Makefile
mergesort.c [new file with mode: 0644]
mergesort.h [new file with mode: 0644]
test-mergesort.c [new file with mode: 0644]