席家峰的博客

山不在高,有仙则名.

LeetCode第797题 All Paths From Source to Target

class Solution {public:    vector<vector<int>> paths;        void findPath(vector<vector&a...

2018-04-07 21:25:56

阅读数:37

评论数:0

动态规划

 copy#include <iostream>    #include <algorithm>   using namespace std;     #define MAX 101      int D[MA...

2018-04-07 12:55:41

阅读数:19

评论数:0

LeetCode 789

class Solution {public:    bool escapeGhosts(vector<vector<int>>& ghosts, vector<i...

2018-04-06 22:30:35

阅读数:42

评论数:0

DFS

#include <iostream>#include <stack>#define N 5using namespace std;int maze[N][N] ={   {0,1,1,0,0},   {0,0...

2018-04-06 16:08:40

阅读数:17

评论数:0

BFS

#include <iostream>#include <queue>#define N 5using namespace std;int maze[N][N]={{0,1,1,0,0},{0,0,1,1,0}...

2018-04-06 15:36:14

阅读数:18

评论数:0

LeetCode787题

There are n cities connected by m flights. Each fight starts from city u and arrives at v with a price w.Now given all the cities and fights, togethe...

2018-04-06 14:06:15

阅读数:28

评论数:0

LeetCode第676题

Implement a magic directory with buildDict, and search methods.For the method buildDict, you'll be given a list of non-repetitive words to build a di...

2018-04-05 21:37:49

阅读数:34

评论数:0

LeetCode 695. Max Area of Island

Given a non-empty 2D array grid of 0's and 1's, an island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) Y...

2018-04-02 00:54:11

阅读数:23

评论数:0

LeetCode第628题

Given an integer array, find three numbers whose product is maximum and output the maximum product.Example 1:Input: [1,2,3] Output: 6 Example 2:Input...

2018-04-01 17:11:05

阅读数:38

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭