上一页 1 2 3 4 5 6 7 ··· 10 下一页
摘要: Fibonacci String HDU - 1708 After little Jim learned Fibonacci Number in the class , he was very interest in it.Now he is thinking abo... 阅读全文
posted @ 2018-05-12 13:47 focus5679 阅读(149) 评论(0) 推荐(0) 编辑
摘要: Message Decowding HDU - 2716The cows are thrilled because they've just learned about encrypting messages. They think they will be able... 阅读全文
posted @ 2018-05-12 13:45 focus5679 阅读(96) 评论(0) 推荐(0) 编辑
摘要: Speed Limit POJ - 2017 Bill and Ted are taking a road trip. But the odometer in their car is broken, so they don't know how many miles... 阅读全文
posted @ 2018-05-12 13:44 focus5679 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 字符串统计 HDU - 2017 对于给定的一个字符串,统计其中数字字符出现的次数。Input输入数据有多行,第一行是一个整数n,表示测试实例的个数,后面跟着n行,每行包括一个由字母和数字组成的字符串。Output对于每个测试实例,输出该串中数值的个数,每个输出占一行... 阅读全文
posted @ 2018-05-12 13:42 focus5679 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 05-树7 堆中的路径(25 分)将一系列给定数字插入一个初始为空的小顶堆H[]。随后对任意给定的下标i,打印从H[i]到根结点的路径。输入格式:每组测试第1行包含2个正整数N和M(≤1000),分别是插入元素的个数、以及需要打印的路径条数。下一行给出区间[-1000... 阅读全文
posted @ 2018-05-10 20:43 focus5679 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 堆的定义与操作typedef struct HNode *Heap; /* 堆的类型定义 */struct HNode { ElementType *Data; /* 存储元素的数组 */ int Size; /* 堆中当前元素个数 */... 阅读全文
posted @ 2018-05-09 15:32 focus5679 阅读(201) 评论(0) 推荐(0) 编辑
摘要: AVL树的旋转与插入typedef struct AVLNode *Position;typedef Position AVLTree; /* AVL树类型 */struct AVLNode{ ElementType Data; /* 结点数据 */ AV... 阅读全文
posted @ 2018-05-09 15:31 focus5679 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 二叉搜索树的插入与删除BinTree Insert( BinTree BST, ElementType X ){ if( !BST ){ /* 若原树为空,生成并返回一个结点的二叉搜索树 */ BST = (BinTree)malloc(sizeo... 阅读全文
posted @ 2018-05-09 15:30 focus5679 阅读(714) 评论(0) 推荐(0) 编辑
摘要: 递归实现void InorderTraversal( BinTree BT ){ if( BT ) { InorderTraversal( BT->Left ); /* 此处假设对BT结点的访问就是打印数据 */ pri... 阅读全文
posted @ 2018-05-09 15:28 focus5679 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 队列的定义与操作-顺序存储typedef int Position;struct QNode { ElementType *Data; /* 存储元素的数组 */ Position Front, Rear; /* 队列的头、尾指针 */ i... 阅读全文
posted @ 2018-05-09 15:26 focus5679 阅读(206) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 10 下一页