Given an array of non-negative integers, you are initially positioned at the first index of the array.
Each element in the array represents your maximum jump length at that position.
Determine if yo...
分类:
其他好文 时间:
2015-03-11 21:40:22
阅读次数:
126
Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:
其他好文 时间:
2015-03-11 21:29:40
阅读次数:
112
欢迎大家阅读参考,如有错误或疑问请留言纠正,谢谢
124 Binary Tree Maximum Path Sum
Given a binary tree, find the maximum path sum.
The path may start and end at any node in the tree.
For example:
Given the belo...
分类:
其他好文 时间:
2015-03-11 14:55:12
阅读次数:
124
uva 10405 Longest Common SubsequenceSequence 1:Sequence 2:Given two sequences of characters, print the length of the longest common subsequence of both sequences. For example, the longest common subseq...
分类:
其他好文 时间:
2015-03-11 00:47:35
阅读次数:
140
求二叉树的最大深度/** * Definition for binary tree * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ int m...
分类:
其他好文 时间:
2015-03-10 23:06:11
阅读次数:
160
Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [?2,1,?3,4,?1,2,...
分类:
其他好文 时间:
2015-03-10 19:07:17
阅读次数:
126
学习lua不得不了解其方法或者说语法的特性,比如:多值返回function maximum (a) local mi = 1 -- maximum index local m = a[mi] -- maximum value for i,val in ipairs(a) do ...
分类:
移动开发 时间:
2015-03-10 18:44:37
阅读次数:
150
题目链接:Codeforces 484B Maximum Value题目大意:给定一个序列,找到连个数ai和aj,ai%aj尽量大,而且ai≥aj解题思路:类似于素数筛选法的方式,每次枚举aj,然后枚举k,每次用二分找到小于k?aj而且最大的ai,维护答案,过程中加了一些剪枝。#include #i...
分类:
其他好文 时间:
2015-03-10 13:37:12
阅读次数:
182
题意:给你一个矩阵,问你只变动行,能到到最大面积的全为‘1’ 的矩阵。解题思路:先一行一行的求出到了这一列最长连续的1有多少,然后一列一列先hash 然后求 最大值 ,发现%1d好慢。解题代码: 1 // File Name: 375b.cpp 2 // Author: darkdream 3 //...
分类:
其他好文 时间:
2015-03-09 22:15:34
阅读次数:
213
http://blog.sina.com.cn/s/blog_679e1329010141x3.html本文参考论文 ICPR2006-《Efficient Non-Maximum Suppression》一、简介非极大值抑制(NMS)可以看做是局部最大值的搜索问题,NMS是许多计算机视觉算法的部分...
分类:
其他好文 时间:
2015-03-09 20:36:10
阅读次数:
191