摘要: 已知先序,后序 求中序 class Solution { public: /** * 返回所求中序序列 * @param n int整型 二叉树节点数量 * @param pre int整型vector 前序序列 * @param suf int整型vector 后序序列 * @return int 阅读全文
posted @ 2020-08-06 22:47 Grisaia 阅读(341) 评论(0) 推荐(0)
摘要: 原理: 常用的输入有3种类型。cin>scanf>getchar() 输入挂选择就是以getchar()来编写的一个函数。 整型输入挂: bool scan_d(intl &num) //改成输入数据类型 { char in;bool IsN=false; in=getchar(); if(in== 阅读全文
posted @ 2020-08-06 13:40 Grisaia 阅读(168) 评论(0) 推荐(0)