11 2018 档案

摘要:1 root是根节点 2 BiNode * temp, * root1; 3 void swap(BiNode root1){ 4 if(root1 == NULL) return; 5 else{ 6 temp = root1->lchild; 7 root1->lchild = root1->rchild; 8 ... 阅读全文
posted @ 2018-11-28 20:30 左手边五十米 阅读(497) 评论(0) 推荐(0)
摘要:1、森林转二叉树 (1)、把每棵树转换为二叉树 (2)、第一棵二叉树不动,从第二棵二叉树开始,一次把后一棵二叉树的根结点作为前一棵二叉树的根结点的右孩子,用线连接起来。 转换规则:兄弟相连,长兄为父,孩子靠左。 2、树转二叉树 (1)、加线。在所有的兄弟结点之间加一条线。 (2)、去线。树中的每个结 阅读全文
posted @ 2018-11-27 16:44 左手边五十米 阅读(2420) 评论(0) 推荐(1)
摘要:原文:https://blog.csdn.net/yanerhao/article/details/45175943 面试题目或多或少会出现这样的选择题或者简答题: 首先我们得知道概念: 前序遍历:先访问当前节点,再访问当前节点的左子树,最后访问当前节点的右子树。对于二叉树,深度遍历与此同。规律:根 阅读全文
posted @ 2018-11-27 15:08 左手边五十米 阅读(1522) 评论(0) 推荐(0)
摘要:OK, maybe stealing the Duchess’s favorite ruby necklace was not such a good idea. You were makingyour way toward the city gates when you heard the sou 阅读全文
posted @ 2018-11-23 20:14 左手边五十米 阅读(10718) 评论(0) 推荐(0)
摘要:Boggle is a game in which 16 dice with letters on each side are placed into a 4 × 4 grid. Players then attempt to find words using letters from adjace 阅读全文
posted @ 2018-11-21 20:18 左手边五十米 阅读(226) 评论(0) 推荐(0)
摘要:The Production Manager of a dance company has been tasked with determining the cost for the seasonaldance recital. Because of their exceptional skills 阅读全文
posted @ 2018-11-07 10:42 左手边五十米 阅读(276) 评论(0) 推荐(0)
摘要:讲算法肯定要有相应的OJ,这里附上一道题,HDU5950 大佬博客:链接:https://www.jianshu.com/p/25eba927d9da 简单讲解下题意。F(n) = F(n-1) + 2F(n-2) + n4,且F(1) = a , F(2) = b,求F(n)%2147493647 阅读全文
posted @ 2018-11-01 09:03 左手边五十米 阅读(206) 评论(0) 推荐(0)