码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
maven环境搭建
下载Maven官方下载地址:http://maven.apache.org/download.html选择你所希望下载的版本,并保存到常用安装目录。这里以Maven 3.3.3 (Binary zip)为例(二进制文件可直接使用)。安装maven下载完成之后解压到对应目录:F:\jiao-doc\m...
分类:其他好文   时间:2015-08-02 13:07:12    阅读次数:162
Same Tree
题目: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...
分类:其他好文   时间:2015-08-02 08:55:40    阅读次数:114
Symmetric Tree
题目: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 / ...
分类:其他好文   时间:2015-08-02 08:54:04    阅读次数:179
Path Sum
题目:Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum...
分类:其他好文   时间:2015-08-02 08:50:43    阅读次数:91
【LeetCode-面试算法经典-Java实现】【067-Add Binary(二进制加法)】
【067-Add Binary(二进制加法)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题  Given two binary strings, return their sum (also a binary string).   For example,   a = "11"   b = "1"   Return "100" 题目大意  给定两个二进制的字符串...
分类:编程语言   时间:2015-08-02 06:23:42    阅读次数:194
[CareerCup] 4.4 Create List at Each Depth of Binary Tree 二叉树的各层创建链表
4.4 Given a binary tree, design an algorithm which creates a linked list of all the nodes at each depth (e.g., if you have a tree with depth D, you'll...
分类:其他好文   时间:2015-08-02 00:55:41    阅读次数:137
leetcode-190-Reverse Bits
Reverse Bits    Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represen...
分类:其他好文   时间:2015-08-01 23:36:18    阅读次数:145
Path Sum II
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tree andsum =...
分类:其他好文   时间:2015-08-01 23:27:33    阅读次数:114
leetCode 103.Binary Tree Zigzag Level Order Traversal (二叉树Z字形水平序) 解题思路和方法
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 ...
分类:其他好文   时间:2015-08-01 22:08:36    阅读次数:141
leetCode 104.Maximum Depth of Binary Tree(二叉树最大深度) 解题思路和方法
Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node. 思路:很基础的一个题,DFS即可。代码如下: /** * Defin...
分类:其他好文   时间:2015-08-01 22:08:25    阅读次数:140
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!