摘要: // 面试题68:树中两个结点的最低公共祖先 // 题目:输入两个树结点,求它们的最低公共祖先。 #include <cstdio> #include "Tree.h" #include <list> using namespace std; // 得到树结点的路径 bool GetNodePath 阅读全文
posted @ 2020-04-14 23:37 源周率 阅读(106) 评论(0) 推荐(0) 编辑
摘要: // 面试题67:把字符串转换成整数 // 题目:请你写一个函数StrToInt,实现把字符串转换成整数这个功能。当然,不 // 能使用atoi或者其他类似的库函数。 #include <cstdio> long long StrToIntCore(const char* str, bool min 阅读全文
posted @ 2020-04-14 16:50 源周率 阅读(142) 评论(0) 推荐(0) 编辑