文件名称:LeastCommonAncestors
-
所属分类:
- 标签属性:
- 上传时间:2013-07-03
-
文件大小:1kb
-
已下载:1次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
求一棵二叉树的2个结点的最近公共祖先
输入:根据带空指针的先序遍历结果建立普通二叉树
数据元素类型:字符类型
空指针: #
输入格式: 第一行:依次为元素个数N
第二行:元素序列
第三行:字符x 字符y
输出格式:x与y的最近共同祖先的元素值,或者NULL。
注意:1、输入错误时,输出ERROR(大写)并结束程序。2、树节点保存的元素值为字符类型。3、任意多余输出视为错误。4、二叉树的结点关键字是主关键字
-Seeking a binary tree of two recent common ancestor node input: with a null pointer under preorder traversal results establish ordinary binary data element types: character type null pointer:# Input format: The first line: the order of the number of elements N Second row: the third line of the sequence of elements: Character x Character y output format: x and y of the most recent common ancestor of the element value, or NULL. Note: 1, input error, the output ERROR (uppercase) and end the program. 2, the elements of the tree node holds the value character type. 3, any excess output as an error. 4, the binary tree node keyword is the primary key
输入:根据带空指针的先序遍历结果建立普通二叉树
数据元素类型:字符类型
空指针: #
输入格式: 第一行:依次为元素个数N
第二行:元素序列
第三行:字符x 字符y
输出格式:x与y的最近共同祖先的元素值,或者NULL。
注意:1、输入错误时,输出ERROR(大写)并结束程序。2、树节点保存的元素值为字符类型。3、任意多余输出视为错误。4、二叉树的结点关键字是主关键字
-Seeking a binary tree of two recent common ancestor node input: with a null pointer under preorder traversal results establish ordinary binary data element types: character type null pointer:# Input format: The first line: the order of the number of elements N Second row: the third line of the sequence of elements: Character x Character y output format: x and y of the most recent common ancestor of the element value, or NULL. Note: 1, input error, the output ERROR (uppercase) and end the program. 2, the elements of the tree node holds the value character type. 3, any excess output as an error. 4, the binary tree node keyword is the primary key
(系统自动生成,下载前可以参看下载内容)
下载文件列表
寻找最近公共祖先.c
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.