码迷,mamicode.com
首页 >  
搜索关键字:binary    ( 11734个结果)
[LeetCode] Maximal Square 最大正方形
Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area.For example, given the following matr...
分类:其他好文   时间:2015-06-04 00:56:05    阅读次数:132
Binary Tree Level Order Traversal II --leetcode C++
考察点广度优先遍历--层次遍历STL内容器的用法广度优先遍历的时候,首先应该想到的就是借助于队列。还需要在遍历下一层之前保存当前层节点的数量代码很简单:class Solution {public: vector > levelOrderBottom(TreeNode* root) { ...
分类:编程语言   时间:2015-06-03 23:18:56    阅读次数:290
Balanced Binary Tree --Leetcode C++
递归左子树是否为平衡二叉树右子树是否为平衡二叉树左右子树高度差是否大于1,大于1,返回false否则判断左右子树最简单的理解方法就是如下的思路:class Solution {public: bool isBalanced(TreeNode* root) { if(root==N...
分类:编程语言   时间:2015-06-03 21:22:47    阅读次数:111
Convert Sorted List to Binary Search Tree ------C++ 递归创建平衡二叉查找树
有序链表0->1->2->3->4->5转换为一个二叉排序树。我们在此创建一个平衡二叉排序树1.先找链表到中间的节点2.中间节点的val创建一个新的树节点TreeNode3.将链表断裂为2部分4.递归创建左子树和右子树#include#includeusing namespace std;struc...
分类:编程语言   时间:2015-06-03 21:21:46    阅读次数:131
Maximal Square (leeCode)
Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area. For example, given the following matrix: 1 0 1 0 0 1 0 1 1 1 1 1 1 1 1 1 0 0 1 0 ...
分类:其他好文   时间:2015-06-03 17:45:21    阅读次数:101
【动态规划】leetcode - Maximal Square
题目: Maximal Square   Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area. For example, given the following matrix: 1 0 1 0...
分类:其他好文   时间:2015-06-03 15:43:47    阅读次数:173
【Scramble String】cpp
题目:Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representat...
分类:其他好文   时间:2015-06-03 15:33:00    阅读次数:168
[LeetCode] Maximal Square
Maximal SquareGiven a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area.For example, given the ...
分类:其他好文   时间:2015-06-03 13:38:09    阅读次数:125
【DeepLearning学习笔记】Neurons神经元
今天找到一个比较好的deep learning的教材:Neural Networks and Deep Learning对神经网络有详细的讲解,鉴于自己青年痴呆,还是总结下笔记吧=。=Perceptron感知器Perceptron的输入的一组binary变量xi,对这些binary变量求出加权和后,...
分类:其他好文   时间:2015-06-03 13:20:44    阅读次数:151
leetcode—102 Binary Tree Level Order Traversal(二叉树的层次遍历)
解题思路: 广度遍历而且要记录每一层。广度遍历利用队列实现,记录用列表实现 使用一个列队,一个列表。 列队用于记录每一层节点,列表用于存储每一层的节点...
分类:其他好文   时间:2015-06-03 11:59:49    阅读次数:80
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!