自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(124)
  • 收藏
  • 关注

原创 dddd

MapService_MapServer mapservice = new MapService_MapServer();mapservice.Url = “http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/”;MapServerInfo mapi

2014-01-16 23:46:12 764

原创 LeetCode-Word Ladder

class Solution {public: int ladderLength(string start, string end, unordered_set &dict) { // Start typing your C/C++ solution below // DO NOT write int main() function uno

2013-08-22 21:14:02 615

原创 LeetCode-Palindrome Partitioning II

class Solution {public: int minCut(string s) { // Start typing your C/C++ solution below // DO NOT write int main() function if (s.size() == 0) { retur

2013-08-22 16:34:49 500

原创 LeetCode-Palindrome Partitioning

class Solution {public: vector> partition(string s) { // Start typing your C/C++ solution below // DO NOT write int main() function vector > sets; vector > F(s.siz

2013-08-22 12:52:13 513

原创 LeetCode-Populating Next Right Pointers in Each Node

/** * Definition for binary tree with next pointer. * struct TreeLinkNode { * int val; * TreeLinkNode *left, *right, *next; * TreeLinkNode(int x) : val(x), left(NULL), right(NULL), next(N

2013-08-21 20:28:44 432

原创 LeetCode-Longest Consecutive Sequence

class Solution {public: int longestConsecutive(vector &num) { // Start typing your C/C++ solution below // DO NOT write int main() function int maxLen = 0; m

2013-08-21 19:58:41 436

原创 LeetCode-Surrounded Regions

class Solution {public: void solve(vector> &board) { // Start typing your C/C++ solution below // DO NOT write int main() function if (board.size() == 0 || board[0].s

2013-08-21 19:56:35 434

原创 LeetCode-Distinct Subsequences

递归:只能过小数据class Solution {public: int numDistinct(string S, string T) { // Start typing your C/C++ solution below // DO NOT write int main() function int cnt = 0;

2013-08-20 19:12:57 401

原创 Subsets II

class Solution {public: vector > subsetsWithDup(vector &S) { // Start typing your C/C++ solution below // DO NOT write int main() function sort(S.begin(), S.end());

2013-08-20 18:02:50 396

原创 LeetCode-Word Search

class Solution {public: bool exist(vector > &board, string word) { // Start typing your C/C++ solution below // DO NOT write int main() function if (word == "") {

2013-08-20 10:20:30 439

原创 LeetCode-Wildcard Matching

class Solution {public: bool isMatch(const char *s, const char *p) { // Start typing your C/C++ solution below // DO NOT write int main() function if (*s == '\0' && *p ==

2013-08-19 20:17:42 448

原创 LeetCode-Combination Sum II

class Solution {public: vector > combinationSum2(vector &num, int target) { // Start typing your C/C++ solution below // DO NOT write int main() function sort(num.beg

2013-08-19 16:23:58 451

原创 LeetCode-Combination Sum

class Solution {public: vector > combinationSum(vector &candidates, int target) { // Start typing your C/C++ solution below // DO NOT write int main() function sort(c

2013-08-19 13:40:24 390

原创 LeetCode-Sudoku Solver

class Solution {public: void solveSudoku(vector > &board) { // Start typing your C/C++ solution below // DO NOT write int main() function solveSudoku1(board); }

2013-08-18 21:55:46 471

原创 LeetCode-Valid Sudoku

class Solution {public: bool isValidSudoku(vector > &board) { // Start typing your C/C++ solution below // DO NOT write int main() function bool ans = true; const

2013-08-18 20:50:28 388

原创 LeetCode-Substring with Concatenation of All Words

class Solution {public: vector findSubstring(string S, vector &L) { // Start typing your C/C++ solution below // DO NOT write int main() function vector ans;

2013-08-18 15:50:16 453

原创 LeetCode-Anagrams

class Solution {public: vector anagrams(vector &strs) { // Start typing your C/C++ solution below // DO NOT write int main() function vector ans; vector > dics;

2013-08-18 13:25:54 446

原创 LeetCode-Search in Rotated Sorted Array II

class Solution {public: bool search(int A[], int n, int target) { // Start typing your C/C++ solution below // DO NOT write int main() function bool isFound = false;

2013-08-18 11:36:32 410

原创 LeetCode-Maximal Rectangle

class Solution {public: int maximalRectangle(vector > &matrix) { // Start typing your C/C++ solution below // DO NOT write int main() function if (matrix.size() == 0 || ma

2013-08-17 16:55:25 506

原创 LeetCode-Best Time to Buy and Sell Stock III

class Solution {public: int maxProfit(vector &prices) { // Start typing your C/C++ solution below // DO NOT write int main() function int maxPrft = 0; if (prices.

2013-08-17 15:59:49 540

原创 LeetCode-Best Time to Buy and Sell Stock II

class Solution {public: int maxProfit(vector &prices) { // Start typing your C/C++ solution below // DO NOT write int main() function int maxPrft = 0; bool flag =

2013-08-17 15:03:10 556

原创 LeetCode-Best Time to Buy and Sell Stock

class Solution {public: int maxProfit(vector &prices) { // Start typing your C/C++ solution below // DO NOT write int main() function int maxPrft = 0; if (prices.s

2013-08-17 14:36:22 581

原创 LeetCode-Sum Root to Leaf Numbers

/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */class Soluti

2013-08-17 13:13:49 407

原创 LeetCode-Valid Palindrome

class Solution {public: bool isPalindrome(string s) { // Start typing your C/C++ solution below // DO NOT write int main() function bool ans = true; int beg = 0;

2013-08-16 20:36:59 383

原创 LeetCode-Binary Tree Maximum Path Sum

/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */class Soluti

2013-08-16 20:17:57 365

原创 LeetCode-Triangle

class Solution {public: int minimumTotal(vector > &triangle) { // Start typing your C/C++ solution below // DO NOT write int main() function if (triangle.size() == 0 || tr

2013-08-16 18:41:40 396

原创 LeetCode-Pascal's Triangle II

class Solution {public: vector getRow(int rowIndex) { // Start typing your C/C++ solution below // DO NOT write int main() function vector ans(rowIndex + 1, 0); an

2013-08-16 18:05:13 394

原创 LeetCode-Pascal's Triangle

class Solution {public: vector > generate(int numRows) { // Start typing your C/C++ solution below // DO NOT write int main() function vector > ans; vector pre;

2013-08-16 16:46:35 359

原创 LeetCode-Flatten Binary Tree to Linked List

/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */class Soluti

2013-08-16 16:19:29 400

原创 LeetCode-Path Sum II

/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */class Soluti

2013-08-16 15:51:50 431

原创 LeetCode-Path Sum

/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */class Soluti

2013-08-16 14:57:28 364

原创 LeetCode-Minimum Depth of Binary Tree

/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */class Soluti

2013-08-16 12:35:42 365

原创 LeetCode-Balanced Binary Tree

/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */class Soluti

2013-08-16 11:27:30 400

原创 LeetCode-Convert Sorted List to Binary Search Tree

/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; *//** * Definition for binary tree * stru

2013-08-15 21:00:25 341

原创 LeetCode-Convert Sorted Array to Binary Search Tree

/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */class Soluti

2013-08-15 20:51:10 366

原创 LeetCode-Scramble String

class Solution {public: bool isScramble(string s1, string s2) { // Start typing your C/C++ solution below // DO NOT write int main() function //f[len][i][j]表示长度为len的以s1[i]

2013-08-15 20:43:38 482

原创 LeetCode-Gray Code

class Solution {public: vector grayCode(int n) { // Start typing your C/C++ solution below // DO NOT write int main() function int size = 1 << n; vector ans;

2013-08-15 19:44:46 454

原创 LeetCode-Unique Binary Search Trees II

/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */class Soluti

2013-08-15 16:47:11 337

原创 LeetCode-Recover Binary Search Tree

/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */class Soluti

2013-08-15 16:30:56 422

原创 LeetCode-Binary Tree Level Order Traversal II

/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */class Soluti

2013-08-15 16:20:17 378

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

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