码迷,mamicode.com
首页 >  
搜索关键字:right    ( 9126个结果
LeetCode "Populating Next Right Pointers in Each Node"
Apparently BFS is the most obvious one.. but it is not that simple - only constant extra space is provided.Then the only strategy to take is recursion...
分类:其他好文   时间:2014-07-22 00:39:35    阅读次数:258
Convert Sorted Array to Binary Search Tree
/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; ...
分类:其他好文   时间:2014-07-21 00:11:12    阅读次数:254
图片放大居中
图片放大 *{margin:0; padding:0;} ul,li{margin-right: 0; padding:0;} li{list-style:none;} a{text-decoration: none;} .clearfix:before,.clearfix:after{display: table; content: "";}...
分类:其他好文   时间:2014-07-20 23:08:58    阅读次数:336
LeetCode :: Binary Tree Zigzag Level Order Traversal [tree, BFS]
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and alternate between). For example: Given binary...
分类:其他好文   时间:2014-07-20 22:41:23    阅读次数:303
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!