UVA 112 & POJ 1145 Tree Summing(数据结构,二叉树,栈)

该博客讨论如何解决UVA 112和POJ 1145问题,涉及利用LISP S表达式表示的二叉树,寻找具有特定整数和的根到叶路径。文章介绍了输入输出格式,并提供了样例输入和输出,强调了建树和路径搜索(使用DFS)的难点,特别是处理空格、换行和负权重节点。
摘要由CSDN通过智能技术生成

http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=104&page=show_problem&problem=48

http://poj.org/problem?id=1145



 Tree Summing 

Background

LISP was one of the earliest high-level programming languages and, with FORTRAN, is one of the oldest languages currently being used. Lists, which are the fundamental data structures in LISP, can easily be adapted to represent other important data structures such as trees.

This problem deals with determining whether binary trees represented as LISP S-expressions possess a certain property.

The Problem

Given a binary tree of integers, you are to write a p

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值