Go to the source code of this file.
Namespaces
Defines
Functions
- template<typename C > void split (const list< C > &l, nat n, list< C > &head, list< C > &tail)
- head := copy (l[0..n-1]), tail := copy (l[n..N (l)-1]).
- template<typename C > list< C > merge (const list< C > &head, const list< C > &tail, int(*cmp)(const C &, const C &))
- Merge head and tail that are supposed to be ordered increasingly wrt cmp.
- template<typename C > list< C > sort (const list< C > &l, int(*cmp)(const C &, const C &))
- Sort l increasingly wrt to cmp. cmp (x, y) < 0 iff x < y, cmp (x, y) = 0 iff x = y, cmp (x, y) > 0 iff x > y.
Detailed Description
Merge sort for linked lists.
Definition in file list_sort.hpp.
Define Documentation
#define TMPL template<typename C> |