init
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
// This file will not be tested, you can modify it.
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "dlist_merge_sort.h"
|
||||
|
||||
static void dlist_print(struct dlist *dl)
|
||||
{}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
struct dlist *l = dlist_init();
|
||||
dlist_push_back(l, 4);
|
||||
dlist_push_back(l, 2);
|
||||
dlist_push_back(l, 5);
|
||||
dlist_push_back(l, 1);
|
||||
dlist_push_back(l, 3);
|
||||
|
||||
printf("Before sort: ");
|
||||
dlist_print(l); // TODO
|
||||
|
||||
dlist_merge_sort(l);
|
||||
|
||||
printf("After sort: ");
|
||||
dlist_print(l); // TODO
|
||||
|
||||
dlist_clear(l);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user