码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
lintcode453- Flatten Binary Tree to Linked List- easy
Flatten a binary tree to a fake "linked list" in pre-order traversal. Here we use the right pointer in TreeNode as the nextpointer in ListNode. Notice ...
分类:其他好文   时间:2017-10-13 10:28:21    阅读次数:160
lintcode97- Maximum Depth of Binary Tree- easy
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 l ...
分类:其他好文   时间:2017-10-13 10:24:16    阅读次数:161
lintcode595- Binary Tree Longest Consecutive Sequence- easy
Given a binary tree, find the length of the longest consecutive sequence path. The path refers to any sequence of nodes from some starting node to any ...
分类:其他好文   时间:2017-10-13 10:11:47    阅读次数:121
不同角度看排序
1 按照排序特性分类 首先按照排序本身的操作特性可以分为下面几种: (1)插入排序 a.直接插入排序(Insert Sort) O(n^2)(稳定) b.折半插入排序(Binary Insert Sort) (不稳定) c.希尔排序(Shell Sort) (不稳定) (2)交换排序 a.冒泡排序( ...
分类:编程语言   时间:2017-10-13 00:43:52    阅读次数:311
Logistic Regression Using Gradient Descent -- Binary Classification 代码实现
1. 原理 Cost function Theta 2. Python 3. C++ ...
分类:其他好文   时间:2017-10-12 23:10:42    阅读次数:170
[BZOJ 3441]乌鸦喝水
3441: 乌鸦喝水 Description 【题目背景】 一只乌鸦在自娱自乐,它在面前放了n个有魔力的水缸,水缸里装有无限的水。 【题目描述】 他准备从第1个水缸飞到第n个水缸,共m次。在飞过一个水缸的过程中,如果他能够得着水缸里的水,即水缸口到水面距离小于等于乌鸦能够得着的深度,那它就会喝水缸里 ...
分类:其他好文   时间:2017-10-12 23:08:38    阅读次数:286
*lintcode578- Lowest Common Ancestor III- medium
Given the root and two nodes in a Binary Tree. Find the lowest common ancestor(LCA) of the two nodes.The lowest common ancestor is the node with large ...
分类:其他好文   时间:2017-10-12 14:00:02    阅读次数:205
lintcode474- Lowest Common Ancestor II- easy
Given the root and two nodes in a Binary Tree. Find the lowest common ancestor(LCA) of the two nodes. The lowest common ancestor is the node with larg ...
分类:其他好文   时间:2017-10-12 10:13:51    阅读次数:154
144. Binary Tree Preorder Traversal
class Solution { public List preorderTraversal(TreeNode root) { Stack stack=new Stack(); List res=new ArrayList(); while(root!=null||!stack.isEmpty())... ...
分类:其他好文   时间:2017-10-12 10:08:42    阅读次数:181
67. Add Binary
计算二进制 java: ...
分类:其他好文   时间:2017-10-11 20:18:43    阅读次数:125
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!