- 博客(5)
- 收藏
- 关注
原创 1123 Is It a Complete AVL Tree (30 分)【AVL树建立和层序遍历bfs】
An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any time they differ by more than one, rebalancing is...
2019-03-29 11:25:25 316
原创 1066 Root of AVL Tree (25 分)【套建AVL树模板】
An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any time they differ by more than one, rebalancing is...
2019-03-28 21:30:44 275
原创 PAT甲级1010 Radix (25 分)【二分查找+进制转换】
Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer isyes, if 6 is a decimal number and 110 is a binary number. Now for any pair of positive inte...
2019-03-19 12:03:38 268
原创 PAT甲级1127 ZigZagging on a Tree (30 分)【后序中序转为先序并输出层序遍历(s型)】
1127ZigZagging on a Tree(30 分) Suppose that all the keys in a binary tree are distinct positive integers. A unique binary tree can be determined by a given pair of postorder and inorder traversal s...
2019-03-05 10:57:22 295
原创 1087 All Roads Lead to Rome (30 分)【dijkstra+dfs】
Indeed there are many different tourist routes from our city to Rome. You are supposed to find your clients the route with the least cost while gaining the most happiness. Input Specification: Each ...
2019-03-01 18:59:23 324
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人