![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
迟来的数据结构
文章平均质量分 58
且走且停
这个作者很懒,什么都没留下…
展开
-
迟来的数据结构-并查集-C语言实现
typedefstruct{ int*root; intcap; intcount; }LcUnionFind; LcUnionFind*LcUnionFindInit(intcap){ LcUnionFind*unionFind=malloc(sizeof(LcUnionFind)); memset(unionFind,0,sizeof(LcUnionFind)); unionFind->cap=ca...原创 2021-07-30 22:24:04 · 109 阅读 · 0 评论 -
迟来的数据结构-字典树(前缀树)-C语言实现
#define ALPHABET_SIZE 26 typedef struct lc_trie_node{ bool isEnd; struct lc_trie_node *children[ALPHABET_SIZE]; } LcTrie; LcTrie *LcTrieInit() { LcTrie *lcTrie = malloc(sizeof(LcTrie)); memset(lcTrie, 0, sizeof(lcTrie)); lcTrie->is.原创 2021-07-26 14:26:46 · 187 阅读 · 0 评论 -
迟来的数据结构-堆(优先队列)-C语言实现
头文件 lc_heap.h #ifndef LEETCOCE_HEAP_H #define LEETCOCE_HEAP_H #define LC_HeapMinData -1 typedef int LC_HeapElement; typedef int(*LC_HeapElementCmp)(const LC_HeapElement* l,const LC_HeapElement* r); typedef struct tagLCHeap{ int capacity; int c.原创 2021-07-14 23:31:14 · 158 阅读 · 3 评论