摘要: 递归#include #include #include #define NUM 4int total = 0;void print_board(int *board){ printf("\n"); for (int i = 0; i #include #define NUM 4int ... 阅读全文
posted @ 2014-07-30 17:12 liuzhijiang123 阅读(281) 评论(0) 推荐(0) 编辑
摘要: 字典树,又称单词查找树,Trie树,是一种树形结构,典型应用是用于统计,排序和保存大量的字符串,所以经常被搜索引擎系统用于文本词频统计。它的优点是:利用字符串的公共前缀来节约存储空间,最大限度的减少无谓的字符串比较,查询效率比哈希表高。它有三个基本性质,根节点不包含字符,除根节点外每一个节点都只包含... 阅读全文
posted @ 2014-07-30 11:19 liuzhijiang123 阅读(252) 评论(0) 推荐(0) 编辑
摘要: ?匹配任意一个字符,*匹配任务多个字符(包括0)#include #include int match(const char *src, const char *pattern){ if (src == NULL || pattern == NULL) { return 0... 阅读全文
posted @ 2014-07-30 10:15 liuzhijiang123 阅读(127) 评论(0) 推荐(0) 编辑