Skip to content

Instantly share code, notes, and snippets.

View limboinf's full-sized avatar
🎯
Focusing

limbo limboinf

🎯
Focusing
View GitHub Profile
@limboinf
limboinf / 二叉树链式存储与遍历.c
Created January 18, 2017 04:14
重点就是:递归和链表的运用。
//
// Created by 方朋 on 2017/1/4.
//
#include <stdio.h>
#include <stdlib.h>
#define OK 1
#define ERROR 0
@limboinf
limboinf / 二叉树之顺序存储.c
Created January 17, 2017 15:08
顺序存储,代码中有几个TODO需要搞明白。
//
// Created by 方朋 on 2017/1/6.
//
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define OK 1
#define ERROR 0
#define TRUE 1
@limboinf
limboinf / string.c
Last active January 11, 2017 09:44
数据结构之:串
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define OK 1
#define ERROR 0
#define TRUE 1
#define FALSE 0
#define MAXSIZE 40 /* 存储空间初始分配量 */
@limboinf
limboinf / huiwen.py
Created January 4, 2017 03:27
回文
# coding=utf-8
n = int(raw_input().strip())
item = [int(x) for x in raw_input().strip().split()]
def huiwen(item, head, tail):
times=0
left = item[head]
right = item[tail]
while (head < tail):
@limboinf
limboinf / gen_avatar.py
Created January 3, 2017 07:21
Python生成1-9宫格头像
# coding=utf-8
__author__ = 'fang'
import os
import uuid
import time
from common.qn import qiNiu
import urllib2
import cStringIO
from PIL import Image
from settings import image_collections
@limboinf
limboinf / 链队列.c
Created December 28, 2016 07:26
数据结构:链对
//
// Created by 方朋 on 16/12/20.
//
#include <stdio.h>
#include <stdlib.h>
#include "global.h"
/*
@limboinf
limboinf / 顺序队列.c
Created December 28, 2016 05:44
数据结构:顺序队列
//
// Created by 方朋 on 16/12/20.
//
#include <stdio.h>
#include <stdlib.h>
#include "global.h"
/*
@limboinf
limboinf / 队列.c
Created December 24, 2016 14:44
数据结构:队列
/*
* ADT 队列(Queue)
* Data
* 同线性表。元素具有相同的类型,相邻元素具有前驱和后继关系。
* Operation
* InitQueue(*Q) // 初始化, 建立一个空队列
* DestroyQueue(*Q) // 若Q存在则销毁队列
* ClearQueue(*Q) // 将队列Q清空
* QueueEmpty(Q) // 是否为空
@limboinf
limboinf / 链栈.c
Created December 24, 2016 09:03
数据结构:链栈
//
// Created by 方朋 on 16/12/20.
//
#include <stdio.h>
#include <stdlib.h>
#include "global.h"
/*
@limboinf
limboinf / 两顺序栈共享空间.c
Created December 24, 2016 07:32
数据结构:两栈共享空间
//
// Created by 方朋 on 16/12/20.
//
#include <stdio.h>
#include "global.h"
/*
* ADT 栈(stack)