![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
lycommand
这个作者很懒,什么都没留下…
展开
-
二叉树的序列化与还原
遇到一个二叉树序列化的问题,就是用字符串或者数组来表示二叉树,或者使用字符串或者数组来还原二叉树,以下是源程序 #include #include #include using namespace std; typedef struct _BiTree { char data; struct _BiTree *left; struct _BiT原创 2015-09-13 20:31:06 · 660 阅读 · 0 评论 -
字典树与模糊搜索
字典树是一种存储字符串的树形结构,假设有如下场景,给出一堆字符串,然后让你求出以某个字符串为前缀的字符串的个数比如给你abcd,abce,然后让你求以abc为前缀的字符串的个数 代码如下:#include <iostream> #include <string> using namespace std; typedef struct _Node { int ...原创 2018-02-23 17:27:10 · 1049 阅读 · 0 评论