Nick

亘古而常青的昨天永远是过去,也永远会再来。

124 Binary Tree Maximum Path Sum 求二叉树的最大路径和

Given a binary tree, find the maximum path sum.For this problem, a path is defined as any sequence of nodes from some starting node to any node in th...

2017-07-31 10:11:19

阅读数:160

评论数:0

104/111 Maximum/Minimum Depth of Binary Tree(二叉树求深度)

104 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 fart...

2017-07-29 15:11:33

阅读数:226

评论数:0

85 Maximal Rectangle (最大矩形)

Given a 2D binary matrix filled with 0’s and 1’s, find the largest rectangle containing only 1’s and return its area. For example, given the followin...

2017-07-27 19:48:28

阅读数:246

评论数:0

84 Largest Rectangle in Histogram(直方图中最大的矩形)

Given n non-negative integers representing the histogram’s bar height where the width of each bar is 1, find the area of largest rectangle in the his...

2017-07-26 17:32:48

阅读数:195

评论数:0

88/19 Merge Sorted Array/Remove Nth Node From End of List(指针运算)

88 Merge Sorted Array Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note: You may assume that ...

2017-07-25 10:40:31

阅读数:250

评论数:0

Ububtu16.04+GTX1070 环境配置

折腾如下: 硬件GTX1070 I5-6600k 华硕Z170i主板 海盗船DDR4 2400 8G×2 海盗船sfx 450电源 海盗船H50水冷 GT1850 12cm散热风扇 三星NVME SM951 512G SSD 银欣SG13b itx机箱系统WIN10 Ubuntu16.04...

2017-07-25 08:43:18

阅读数:1083

评论数:0

77 Combinations(组合数)

Given two integers n and k, return all possible combinations of k numbers out of 1 … n.For example,If n = 4 and k = 2, a solution is:[ [2,4], [3,...

2017-07-24 21:35:18

阅读数:207

评论数:0

72 Edit Distance (编辑距离)

Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You have ...

2017-07-23 16:48:14

阅读数:294

评论数:0

62/63 Unique Paths

62 Unique Paths A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below).The robot can only move eithe...

2017-07-21 12:12:14

阅读数:149

评论数:0

利用Hog特征和SVM分类器进行行人检测

之前介绍过Hog特征(http://blog.csdn.net/carson2005/article/details/7782726),也介绍过SVM分类器(http://blog.csdn.net/carson2005/article/details/6453502 );而本文的目的在于介绍利用...

2017-07-20 21:34:56

阅读数:252

评论数:0

目标检测的图像特征提取之HOG特征

目标检测的图像特征提取之(一)HOG特征zouxy09@qq.comhttp://blog.csdn.net/zouxy09 1、HOG特征:       方向梯度直方图(Histogram of Oriented Gradient, HOG)特征是一种在计算机视觉和图像处理中用来进行物体检测的特...

2017-07-20 21:31:11

阅读数:148

评论数:0

SIFT特征提取分析

SIFT(Scale-invariant feature transform)是一种检测局部特征的算法,该算法通过求一幅图中的特征点(interest points,or corner points)及其有关scale 和 orientation 的描述子得到特征并进行图像特征点匹配,获得了良好效...

2017-07-20 19:48:38

阅读数:246

评论数:0

54/59 Spiral Matrix 螺旋矩阵

54 Spiral Matrix 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 foll...

2017-07-20 12:05:08

阅读数:176

评论数:0

51/52 N-Queens(N皇后问题)

51 N-Queens dfs经典问题,采用回溯法求解。 经典的N皇后问题,基本所有的算法书中都会包含的问题,经典解法为回溯递归,一层一层的向下扫描,需要用到一个pos数组,其中pos[i]表示第i行皇后的位置,初始化为-1,然后从第0开始递归,每一行都一次遍历各列,判断如果在该位置放置皇...

2017-07-19 09:46:41

阅读数:208

评论数:0

55/45 Jump Game 跳跃游戏

55 Jump Game 思路:贪心算法,每次记录可以跳到的最远距离。class Solution { public: bool canJump(vector<int>& nums) { if(nums.empty()) return false;...

2017-07-18 10:26:41

阅读数:467

评论数:0

415/43 Add Strings/Multiply Strings

415 Add Strings class Solution { public: string addStrings(string num1, string num2) { reverse(num1.begin(), num1.end()); rever...

2017-07-17 15:55:48

阅读数:176

评论数:0

39/40. Combination Sum (两题)

39.Combination Sum 像这种结果要求返回所有符合要求解的题十有八九都是要利用到递归,而且解题的思路都大同小异,相类似的题目有 Path Sum II 二叉树路径之和之二,Subsets II 子集合之二,Permutations 全排列,Permutations II 全排列之二...

2017-07-15 19:55:00

阅读数:169

评论数:0

36/37. Sudoku Solver 数独问题

36 Valid Sudoku class Solution { public: bool isValidSudoku(vector<vector<char>>& board) { bool used[9]; for (in...

2017-07-14 11:38:01

阅读数:146

评论数:0

什么是P问题、NP问题和NPC问题

这或许是众多OIer最大的误区之一。你会经常看到网上出现“这怎么做,这不是NP问题吗”、“这个只有搜了,这已经被证明是NP问题了”之类的话。你要知道,大多数人此时所说的NP问题其实都是指的NPC问题。他们没有搞清楚NP问题和NPC问题的概念。NP问题并不是那种“只有搜才行”的问题,NPC问题才是。...

2017-07-13 18:04:41

阅读数:129

评论数:0

34. Search for a Range

Given an array of integers sorted in ascending order, find the starting and ending position of a given target value.Your algorithm’s runtime complexi...

2017-07-13 11:23:48

阅读数:118

评论数:0

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