- 博客(10)
- 问答 (1)
- 收藏
- 关注
原创 05-树6. Path in a Heap
Insert a sequence of given numbers into an initially empty min-heap H. Then for any given index i, you are supposed to print the path from H[i] to the root. Input Specification: Each input file contain
2015-04-30 23:42:01 523
原创 04-树5. Complete Binary Search Tree
A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties: •The left subtree of a node contains only nodes with keys less than the node’s key. •The right
2015-04-28 21:28:00 480
原创 04-树4. Search in a Binary Search Tree
04-树4. Search in a Binary Search Tree (25)时间限制 100 ms内存限制 65536 kB代码长度限制 8000 B判题程序 Standard 作者 CHEN, YueTo search a key in a binary search tree, we
2015-04-25 22:13:22 425
原创 04-树3. Root of AVL Tree
04-树3. Root of AVL Tree (25)时间限制 100 ms内存限制 65536 kB代码长度限制 8000 B判题程序 Standard 作者 CHEN, YueAn AVL tree is a self-balancing binary search tree. In an
2015-04-23 22:32:48 442
原创 02-线性结构3. Pop Sequence
Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, ..., N and pop randomly. You are supposed to tell if a given sequence of numbers is a possible pop sequence of t
2015-04-22 23:03:47 369
原创 01-复杂度1. 最大子列和问题
给定K个整数组成的序列{ N1, N2, ..., NK },“连续子列”被定义为{ Ni, Ni+1, ..., Nj },其中 1 <= i <= j <= K。“最大子列和”则被定义为所有连续子列元素的和中最大者。例如给定序列{ -2, 11, -4, 13, -5, -2 },其连续子列{ 11, -4, 13 }有最大的和20。现要求你编写程序,计算给定整数序列的最大子列和。输入
2015-04-22 22:57:20 1486
原创 01-复杂度2. Maximum Subsequence Sum
Given a sequence of K integers { N1, N2, ..., NK }. A continuous subsequence is defined to be { Ni, Ni+1, ..., Nj } where 1 <= i <= j <= K. TheMaximum Subsequence is the continuous subsequence which
2015-04-22 22:42:25 513
原创 03-树2. Tree Traversals Again 自写
03-树2. Tree Traversals Again (25)时间限制 200 ms内存限制 65536 kB代码长度限制 8000 B判题程序 Standard 作者 CHEN, YueAn inorder binary tree traversal can be implemented
2015-04-22 17:11:30 705 2
原创 03-树1. List Leaves 经验
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, the first line gives
2015-04-21 13:30:01 500
空空如也
CodeBlocks调用调试时特别卡
2015-12-06
TA创建的收藏夹 TA关注的收藏夹
TA关注的人