码迷,mamicode.com
首页 >  
搜索关键字:实现题    ( 337个结果
LeetCode14——Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings. 题目大意 写一个函数来找出所有字符串里最长的公共前缀。 难度系数:容易 实现 题目不难,基本思路大家都能想到,就是一些细节可能会遗漏。这个也没啥好算法,不管怎样,都需要一个个去比较。 所以没啥好说...
分类:其他好文   时间:2015-01-27 18:24:51    阅读次数:103
leetcode 【 Trapping Rain Water 】python 实现
题目:Givennnon-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining...
分类:移动开发   时间:2015-01-27 00:08:51    阅读次数:185
leetcode 【 Triangle 】python 实现
题目:Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the ...
分类:编程语言   时间:2015-01-26 20:42:03    阅读次数:180
leetcode 【 Unique Paths II 】 python 实现
题目: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 spac...
分类:编程语言   时间:2015-01-26 16:57:37    阅读次数:161
leetcode 【 Unique Paths 】python 实现
题目: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 poi...
分类:编程语言   时间:2015-01-26 16:32:36    阅读次数:173
leetcode 【 Set Matrix Zeroes 】python 实现
题目:Given amxnmatrix, if an element is 0, set its entire row and column to 0. Do it in place.click to show follow up.Follow up:Did you use extra space?...
分类:编程语言   时间:2015-01-24 21:12:54    阅读次数:192
leetcode 【 Sort Colors 】python 实现
题目:Given an array withnobjects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red,...
分类:编程语言   时间:2015-01-24 19:58:37    阅读次数:213
leetcode 【 Search Insert Position 】python 实现
题目:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in...
分类:编程语言   时间:2015-01-24 12:58:48    阅读次数:285
leetcode 【 Find Peak Element 】python 实现
题目:A peak element is an element that is greater than its neighbors.Given an input array wherenum[i] ≠ num[i+1], find a peak element and return its ind...
分类:编程语言   时间:2015-01-23 00:42:53    阅读次数:277
leetcode 【 Majority Element 】python 实现
题目:Given an array of sizen, find the majority element. The majority element is the element that appears more than? n/2 ?times.You may assume that the ...
分类:编程语言   时间:2015-01-22 17:31:28    阅读次数:159
337条   上一页 1 ... 26 27 28 29 30 ... 34 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!