码迷,mamicode.com
首页 >  
搜索关键字:given n integers    ( 24278个结果
98. Validate Binary Search Tree
Problem : Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node con ...
分类:其他好文   时间:2020-02-17 21:21:48    阅读次数:105
53. Maximum Subarray
Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. Example: Inpu ...
分类:其他好文   时间:2020-02-17 19:59:09    阅读次数:80
42. Trapping Rain Water
Given n non-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. ...
分类:移动开发   时间:2020-02-17 19:37:00    阅读次数:78
15. 3Sum
1.题目描述 英文版: Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which ...
分类:其他好文   时间:2020-02-17 00:47:28    阅读次数:51
11. Container With Most Water
1.题目描述 英文版: Given n non negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that ...
分类:其他好文   时间:2020-02-16 20:34:34    阅读次数:68
Max Sum
Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in th ...
分类:其他好文   时间:2020-02-16 20:25:53    阅读次数:53
39. Combination Sum
Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the ...
分类:其他好文   时间:2020-02-16 01:35:33    阅读次数:58
[LC] 347. Top K Frequent Elements
Given a non-empty array of integers, return the k most frequent elements. Example 1: Input: nums = [1,1,1,2,2,3], k = 2 Output: [1,2] Example 2: Input ...
分类:其他好文   时间:2020-02-16 01:07:50    阅读次数:63
leetcode200 Number of Islands
1 """ 2 Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting ...
分类:其他好文   时间:2020-02-15 23:28:19    阅读次数:68
leetcode542 01 Matrix
1 """ 2 Given a matrix consists of 0 and 1, find the distance of the nearest 0 for each cell. 3 The distance between two adjacent cells is 1. 4 Exampl ...
分类:其他好文   时间:2020-02-15 11:50:37    阅读次数:74
24278条   上一页 1 ... 68 69 70 71 72 ... 2428 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!