C语言
Peter Chan
bulala
展开
-
Redis笔记
list数组操作 lpush rpush lrange lindex llen lrem ltrim lset linsert before/after set操作 sadd smembers scard srem srandmember spop【随机】 smove 集合运算 sdiff sinter sunion hash操作 hset/hget/hmset/hmget/hgetall/...原创 2020-01-20 19:23:54 · 171 阅读 · 0 评论 -
C语言N叉树非递归(前中后遍历法)
#include <stdio.h> #include <stdlib.h> typedef struct kk { char ch; int flag; struct kk *left; struct kk *right; }btree; typedef struct stack { btree *btree[20]; ...原创 2018-10-24 13:27:17 · 990 阅读 · 0 评论 -
KMP算法(C语言)
#include <stdio.h> #include <string.h> int KMP(char *t, char *p, int *next) { int a,i,j; a=0; i=0; j=0; while(i<strlen(t) && a<strlen(p)) if (t[i]==p[a]) { ...原创 2018-10-24 13:29:48 · 289 阅读 · 0 评论 -
二叉树删除前面节点(C语言初始版)
#include &lt;stdlib.h&gt; #include &lt;stdio.h&gt; typedef struct node { int key; struct node *left; struct node *right; } Btree; Btree *InsertBtree(Btree *t,int x) { Btree *f = NULL,...原创 2018-10-24 13:31:03 · 671 阅读 · 0 评论 -
C++实现分配算法
#include <iostream> #include<malloc.h> using namespace std; const int LEN = 640; typedef struct FreeStack { int len,address; struct FreeStack *next; }*FreeLink; typedef struct B...原创 2018-12-10 18:28:29 · 1047 阅读 · 2 评论 -
C++实现LRU算法
#include <iostream> #include <list> using namespace std; //LRU算法 //Blocks 3 //data L: 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1 const int MaxLen = 3; const int Num = 20; typedef struct D...原创 2018-12-11 16:15:56 · 747 阅读 · 0 评论