码迷,mamicode.com
首页 >  
搜索关键字:its    ( 9997个结果
LeetCode: Set Matrix Zeroes [073]
【题目】 Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. 【题意】 给定一个mXn的矩阵,如果其中的元素为0,则对应的行和列都用0填充。 不能申请额外的空间。 【思路】 第一行和第一列空出来标记需要置0的列和行 第一遍扫描: 扫描第一行,判断第一行是否需要清零 ...
分类:其他好文   时间:2014-06-05 08:07:11    阅读次数:229
leetcode -day24 Maximum Depth of Binary Tree & Binary Tree Zigzag Level Order Traversal
1、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. clas...
分类:其他好文   时间:2014-06-02 23:13:22    阅读次数:290
LeetCode: Maximal Rectangle [085]
【题目】 Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area. 【题意】 给定一个由0和1填充的二维矩阵,找一个全是1的最大矩形 【思路】 扫描二维矩阵,凡是扫到值为1的块时候,以当前块为矩形的左上角区块拓展,找最大矩阵。 先找出以每个“1”区块为左上角区块的最大矩形,然后求出最大全局的最大矩...
分类:其他好文   时间:2014-06-02 23:08:07    阅读次数:289
Flipped
More praise for FLIPPED"We flipped over this fantastic book, its gutsy girl Juli and its wise, wonderful ending."--The Chicago Tribune"Delightful! Del...
分类:其他好文   时间:2014-06-02 20:03:59    阅读次数:2055
HDU - 4814 Golden Radio Base (长春赛区B题)
Description Golden ratio base (GRB) is a non-integer positional numeral system that uses the golden ratio (the irrational number (1+√5)/2 ≈ 1.61803399 symbolized by the Greek letter φ) as its base....
分类:其他好文   时间:2014-06-01 15:38:24    阅读次数:252
LeetCode: Binary Tree Inorder Traversal [094]
【题目】 Given a binary tree, return the inorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}, 1 2 / 3 return [1,3,2]. Note: Recursive solution is trivial, could you do it iteratively? confused what "{1,#,2...
分类:其他好文   时间:2014-06-01 13:01:23    阅读次数:279
每日算法之二十二:Swap Nodes in Pairs
Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1->2->3->4, you should return the list as 2->1->4->3. Your algorithm should use only constant space....
分类:其他好文   时间:2014-06-01 10:41:23    阅读次数:242
每日算法之二十三:Reverse Nodes in k-Group
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. If the number of nodes is not a multiple of k then left-out nodes in the end should remain as it is...
分类:其他好文   时间:2014-06-01 09:05:42    阅读次数:271
jaw crusher the materials
For screening materials for different sizes, vibrating screen is playing its role. After separating, the aggragates that can meet your requirements wi...
分类:其他好文   时间:2014-05-31 15:20:11    阅读次数:205
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 le...
分类:其他好文   时间:2014-05-30 15:03:42    阅读次数:237
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!