码迷,mamicode.com
首页 >  
搜索关键字:moral graph    ( 3648个结果
62. Unique Paths (Graph; DP)
A robot is located at the top-left corner of amxngrid (marked 'Start' in the diagram below).The robot can only move either down or right at any point ...
分类:其他好文   时间:2015-10-04 19:33:36    阅读次数:143
79. Word Search (Graph; DFS)
Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where "adjace...
分类:其他好文   时间:2015-10-04 17:14:57    阅读次数:294
73. Set Matrix Zeroes? (Graph)
Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.Follow up: Did you use extra space?A straight forward sol...
分类:其他好文   时间:2015-10-04 17:14:04    阅读次数:176
133. Clone Graph (Graph, Map; DFS)
Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors.OJ's undirected graph serialization:Nodes are labeled u...
分类:其他好文   时间:2015-10-04 17:11:43    阅读次数:239
74. Search a 2D Matrix (Graph; Divide-and-Conquer)
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:Integers in each row are sorted fr...
分类:其他好文   时间:2015-10-04 17:10:18    阅读次数:132
138. Copy List with Random Pointer (Graph, Map; DFS)
A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.Return a deep copy ...
分类:其他好文   时间:2015-10-04 17:10:15    阅读次数:140
54. Spiral Matrix (Graph)
Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. For example,Given the following matrix:[ [ 1,...
分类:其他好文   时间:2015-10-04 17:10:04    阅读次数:165
130. Surrounded Regions (Graph; DFS)
Given a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'.A region is captured by flipping all 'O's into 'X's in that surrounded ...
分类:其他好文   时间:2015-10-04 17:09:19    阅读次数:121
59. Spiral Matrix II (Graph)
Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. For example,Given n = 3,You should return the followin...
分类:其他好文   时间:2015-10-04 17:03:59    阅读次数:106
118. Pascal's Triangle (Graph; WFS)
Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,...
分类:其他好文   时间:2015-10-04 15:52:13    阅读次数:244
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!