- 博客(7)
- 收藏
- 关注
原创 Java的一些简单示例(1)
1、求两个正整数的最大公约数和最小公倍数import java.util.Scanner;public class Test { public static void main(String[] args) { Scanner s = new Scanner(System.in); System.out.println("please input an integ
2016-04-27 21:12:01 278
原创 按层次遍历二叉树
#include <stdio.h>#include <stdlib.h>#define MAXSIZE 20typedef struct node{ char data; struct node * lchild; struct node * rchild;}BTree;typedef struct{ BTree * data[MAXSIZE]; in
2016-04-27 11:33:58 337
原创 二叉树的基本操作(非递归)
#include <stdio.h>#include <stdlib.h>#define MAXSIZE 20typedef struct node{ char data; node * lchild; node * rchild;}BTree;typedef struct{ BTree * data[MAXSIZE]; int top;}SeqSta
2016-04-26 15:18:18 357
原创 二叉树的基本操作(递归)
#include <stdio.h>#include <stdlib.h>typedef struct node{ char data; node * lchild; node * rchild;}BTree;BTree * create(BTree * p){ char ch; scanf("%c",&ch); if(ch != ' '){
2016-04-26 09:16:18 302
原创 链队列的基本操作
#include <stdio.h>#include <stdlib.h>typedef struct node{ char data; struct node * next;}Qnode;typedef struct{ Qnode * front; Qnode * rear;}LinkQueue;LinkQueue * init(){ LinkQueu
2016-04-24 22:10:10 296
原创 循环队列的基本操作
#include <stdio.h>#include <stdlib.h>#define MAXSIZE 20typedef struct{ char data[MAXSIZE]; int rear; int front;}SeqQueue;SeqQueue * init(){ SeqQueue * sq; sq = (SeqQueue *)malloc
2016-04-24 22:09:08 419
原创 链栈的基本操作
#include <stdio.h>#include <stdlib.h>typedef struct node{ char data; node * next;}LStack;LStack * init(){ LStack * ls; ls = (LStack *)malloc(sizeof(LStack)); ls->next = NULL;
2016-04-24 22:07:47 274
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人