![](https://img-blog.csdnimg.cn/20190927151026427.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
二叉树
程序设计竞赛中二叉树相关知识
小飞猪Jay
远风知我意,微凉又深情。
展开
-
1026. 节点与其祖先之间的最大差值
节点与祖先之间的最大差值原创 2023-04-18 09:43:58 · 55 阅读 · 0 评论 -
3384.二叉树遍历
给出先序,中序输出原创 2023-04-12 09:34:55 · 379 阅读 · 0 评论 -
Uva 839 天平问题
题目描述:Before being an ubiquous communications gadget, a mobilewas just a structure made of strings and wires suspendingcolourfull things. This kind of mobile is usually found hangingover cradles of sm...原创 2019-10-24 21:28:41 · 138 阅读 · 0 评论 -
UVa548TREE
题目描述:TreeYou are to determine the value of the leaf node in a given binary tree that is the terminal node of a path of least value from the root of the binary tree to any leaf. The value of a path i...原创 2019-10-24 21:23:29 · 103 阅读 · 0 评论 -
UVA122 树的层次遍历 Trees on the level
题目描述题意翻译树状结构在电脑科学的许多领域中都相当重要。本问题牵涉到建立树及走访树。给你一二元树,你的任务是写一个程式来列印依「阶层(level-order)」走访的结果。在本问题中,二元树的每个节点含有一个正整数,并且节点的数目最少1个,最多256个。在「阶层」走访中,依阶层从低到高,同阶层从左到右的次序来列印。例如以下的二元树阶层走访的结果为:5, 4, 8, 11, 13, 4, ...原创 2019-10-24 21:08:23 · 285 阅读 · 0 评论 -
Dropping Balls(UVa 679)
题目描述:https://vjudge.net/problem/UVA-679解题思路:首先我们可以想到模拟的方法来做,也就是构建一个二叉树来模拟小球的下落,储存每个结点开关的状态,直到第·k个。#include<cstdio>#include<algorithm>#include<cstring>#include<iostream>...原创 2019-10-24 18:28:07 · 117 阅读 · 0 评论