码迷,mamicode.com
首页 >  
搜索关键字:graph coloring    ( 3748个结果
37. Sudoku Solver (Graph; WFS)
Write a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the character'.'.You may assume that there will be on...
分类:其他好文   时间:2015-10-06 14:04:44    阅读次数:237
52. N-Queens II (Graph; WFS)
Follow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.class Solution {public: ...
分类:其他好文   时间:2015-10-06 12:56:18    阅读次数:205
51. N-Queens (Graph; WFS)
Then-queens puzzle is the problem of placingnqueens on ann×nchessboard such that no two queens attack each other.Given an integern, return all distinc...
分类:其他好文   时间:2015-10-06 12:54:25    阅读次数:221
最小生成树-Prim算法和Kruskal算法
最小生成树-Prim算法和Kruskal算法Prim算法1.概览普里姆算法(Prim算法),图论中的一种算法,可在加权连通图里搜索最小生成树。意即由此算法搜索到的边子集所构成的树中,不但包括了连通图里的所有顶点(英语:Vertex (graph theory)),且其所有边的权值之和亦为最小。该算法...
分类:编程语言   时间:2015-10-05 16:56:01    阅读次数:315
64. Minimum Path Sum (Graph; DP)
Given amxngrid filled with non-negative numbers, find a path from top left to bottom right whichminimizesthe sum of all numbers along its path.Note:Yo...
分类:其他好文   时间:2015-10-04 19:35:26    阅读次数:177
63. Unique Paths II (Graph; DP)
Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space i...
分类:其他好文   时间:2015-10-04 19:35:04    阅读次数:129
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!