init commit

This commit is contained in:
2024-03-19 01:05:51 +08:00
commit 199bbf2628
393 changed files with 34883 additions and 0 deletions

View File

@ -0,0 +1,34 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct hfm *HaffmanTree;
struct hfm
{
HaffmanTree node;
int val;
int priority;
};
int hashQ[26]; //权
HaffmanTree tree;
//构建列表
HaffmanTree buildList(char *str)
{
//先计算权
for (int i = 0; i < strlen(str); i++)
{
hashQ[str[i] - 'a']++;
}
return NULL;
}
int main()
{
tree = malloc(hfm) char str[] = "athisteststring";
buildList(str);
return 0;
}