last try on XorLinkList

This commit is contained in:
eason
2023-12-21 00:47:36 +08:00
parent 11bb78c63b
commit 02e0d1d86f
13 changed files with 149 additions and 1506 deletions

View File

@ -1,3 +1,4 @@
#include <stdbool.h>
#include "rust.h"
struct Node{
@ -8,6 +9,8 @@ struct Node{
struct Node* xor_new(void * val);
struct Node* xor_next(struct Node* previous,struct Node* current);
struct Node* xor_insert_front(struct Node* head,void* val);
struct Node* xor_insert_condition(struct Node* head,void* val,bool (*cmp)(void *,void *));
struct Node* xor_insert_mid(struct Node* previous,struct Node* current,void * val);
void debug_head(struct Node* head);
void * xor_remove(struct Node * previous,struct Node* current);
usize xor_count(struct Node* head);