sba/sorting.h
stmctommyau e8fb9616f3 finish normal user;
check out finish;
enhance ui;
fix bugs
2022-09-03 22:16:20 +08:00

13 lines
296 B
C

typedef struct Map{
int key;
void* value;
}Map;
int compare_decending(const void *a, const void *b){
return (*(struct Map *)b).value - (*(struct Map *)a).value;
}
int compare_ascending(const void *a, const void *b){
return (*(struct Map *)a).value - (*(struct Map *)b).value;
}