码迷,mamicode.com
首页 >  
搜索关键字:binary tree paths    ( 24317个结果
剑指OFFER之二叉树的镜像(九度OJ1521)
题目描述:输入一个二叉树,输出其镜像。输入:输入可能包含多个测试样例,输入以EOF结束。对于每个测试案例,输入的第一行为一个整数n(0tree[i].flag =0; t->tree[i].num = 0; t->tree[i].lchild = 0; ...
分类:其他好文   时间:2014-06-04 16:19:58    阅读次数:331
【百度之星2014~复赛)解题报告】The Query on the Tree
这几天把毕业答辩的事弄完了,于是买票出来玩,结果周六是百度之星的复赛,于是我就没有办法来做比赛了,不过看了看题,目测可以过我两三道题.今天已经是比赛的第二天了,我还一直没有时间来A掉这些题,今晚抽空先把最简单的线段树那道题A了再说.题目说的很清楚了,自己看吧.有一棵树,树的每个点有点权,每次有三种操...
分类:其他好文   时间:2014-06-02 16:00:42    阅读次数:225
【百度之星2014~复赛)解题报告】The Query on the Tree
这几天把毕业答辩的事弄完了,于是买票出来玩,结果周六是百度之星的复赛,于是我就没有办法来做比赛了,不过看了看题,目测可以过我两三道题. 今天已经是比赛的第二天了,我还一直没有时间来A掉这些题,今晚抽空先把最简单的线段树那道题A了再说. 题目说的很清楚了,自己看吧. 有一棵树,树的每个点有点权,每次有三种操作:   1. Query x 表示查询以x为根的子树的权值和。   2. Change x y 表示把x点的权值改为y(0<=y<=100)。   3. Root x 表示把x变为根。...
分类:其他好文   时间:2014-06-02 15:04:03    阅读次数:298
OAF_OAF控件Tree的实现(案列)
2014-06-02 BaoXinjian一、摘要实现OAF的Tree功能二、案例需求:实现OAF的Tree功能1. 建立两个Page,树结构页面和明细页面2. 在树页面中建立Tree,在Tree中建立Node和 Members(1). Node的重要属性URI:OA.jsp?page=/bxj/o...
分类:其他好文   时间:2014-06-02 11:07:08    阅读次数:373
LeetCode: Same Tree [100]
【题目】 Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical and the nodes have the same value. 【题意】 判断了两个二叉树是否相等 【思路】 递归...
分类:其他好文   时间:2014-06-02 11:03:03    阅读次数:205
LeetCode: Symmetric Tree [101]
【题目】 Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree is symmetric: 1 / 2 2 / \ / 3 4 4 3 But the following is not: 1 / 2 2 \ 3 3 No...
分类:其他好文   时间:2014-06-02 10:56:14    阅读次数:237
LeetCode: Recover Binary Search Tree [099]
【题目】 Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its structure. Note: A solution using O(n) space is pretty straight forward. Could you devise a constant space solution? confused what "{1,#,2,3}" ...
分类:其他好文   时间:2014-06-02 10:38:17    阅读次数:246
LeetCode: Validate Binary Search Tree [098]
【题目】 Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains only nodes with keys less than the node's key. The right subtree of a node contains only nodes with ke...
分类:其他好文   时间:2014-06-02 10:29:55    阅读次数:257
OAF_OAF控件HGrid的实现(案列)
2014-06-02 BaoXinjian一、摘要实现OAF的HGrid的功能二、案例需求:实现OAF的HGrid的功能1. 建立HGrid Regin2. 建立Tree Regin (1). Tree Node (2). Tree Members3. 建立Table Selection - Mul...
分类:其他好文   时间:2014-06-02 10:17:43    阅读次数:247
java.sql.SQLException: Unknown type '246 in column 0 of 1 in binary-encoded result set的解决办法
最近在大学毕设项目基础上新增一些功能,基于Struts2开源框架,数据库采用的是MySQL。写完后台的新功能代码,单元测试也顺利通过,去整合前台,但是当使用JSP页面操作的时候,没想到报异常了。截图如下:java.sql.SQLException:Unknowntype‘246incolumn2of4inbinary-encodedres..
分类:数据库   时间:2014-06-02 03:02:52    阅读次数:639
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!