sba/sorting.h
stmctommyau 1e5999a4e5 stock fix,typo fix;
reserve code for admin;
self salse system (in work);
2022-09-01 23:46:16 +08:00

13 lines
293 B
C

typedef struct Map{
int key;
void* value;
};
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;
}