数据结构
Ant-Tech
总有人要赢,why not me?http://my.youkuaiyun.com/j_max#
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
05-树7 堆中的路径 (25分)
题目如下 分别有三行输入 第一行:输入堆中节点的总个数N、输入要遍历节点的总个数M。 第二行:输入N个的节点数据 第三行:输入M个节点的下标(打印出从该下标到根的节点数据) 题目主要涉及到最小堆的定义与操作,代码如下:#include<stdio.h> #include<stdlib.h> #define MinData -10001 #define MaxSize 1001 typed原创 2016-05-27 16:34:25 · 799 阅读 · 0 评论 -
06-图1 列出连通集 (25分)
题目输入: 第一行:给出N个顶点,E条边 以下E行给出每条边的两个端点 题目输出: 分别输出DFS、BFS的结果代码如下:#include<stdio.h> #include<stdlib.h> #define MaxVertexNum 10 #define true 1 #define false 0 typedef int Bool; typedef int Ve原创 2016-05-29 22:25:59 · 1030 阅读 · 0 评论 -
List Leaves (25分)
原题描述如下:List Leaves (25分) Given a tree, you are supposed to list all the leaves in the order of top down, and left to right.Input Specification:Each input file contains one test case. For each case,原创 2016-05-20 16:37:24 · 827 阅读 · 0 评论 -
04-树5 Root of AVL Tree (25分)
题目描述:题目大意应该很好理解,关于平衡二叉树的插入与调整。#include<stdio.h> #include<stdlib.h> #define Null -1 typedef struct AVLNode{ int Data; struct AVLNode *Left; struct AVLNode *Right; int Height; }AVLTree; A原创 2016-05-23 20:51:11 · 436 阅读 · 0 评论
分享