码迷,mamicode.com
首页 >  
搜索关键字:given n integers    ( 24278个结果
[LeetCode] 16. 3Sum Closest 最近三数之和
题目描述 给出含有n个整数的数组s,找出s中和加起来的和最接近给定的目标值的三个整数。返回这三个整数的和。你可以假设每个输入都只有唯一解。 例如,给定的整数 S = {-1 2 1 -4}, 目标值 = 1.?? 最接近目标值的和为 2. (-1 + 2 + 1 = 2). Given an arr ...
分类:其他好文   时间:2020-04-23 22:45:49    阅读次数:60
C. Remove Adjacent
You are given a string ss consisting of lowercase Latin letters. Let the length of ss be |s||s|. You may perform several operations on this string. In ...
分类:其他好文   时间:2020-04-23 22:44:20    阅读次数:64
236.Lowest Common Ancestor of a Binary Tree
题目描述 Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia: “The ...
分类:其他好文   时间:2020-04-23 00:51:39    阅读次数:73
Leetcode 560 Subarry Sum Equals K
Leetcode 560 Subarry Sum Equals K Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equ ...
分类:其他好文   时间:2020-04-22 20:19:06    阅读次数:65
1127 ZigZagging on a Tree
Suppose that all the keys in a binary tree are distinct positive integers. A unique binary tree can be determined by a given pair of postorder and ino ...
分类:其他好文   时间:2020-04-22 12:51:03    阅读次数:65
路径总和
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. N ...
分类:其他好文   时间:2020-04-22 10:01:42    阅读次数:64
对称二叉树
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is symmet ...
分类:其他好文   时间:2020-04-22 09:28:17    阅读次数:63
239.Sliding Window Maximum
题目描述 Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the ...
分类:Windows程序   时间:2020-04-21 23:44:12    阅读次数:95
【LeetCode 1. Two Sum】
Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have ex ...
分类:其他好文   时间:2020-04-21 18:36:52    阅读次数:67
二分查找 - bailian 3441:4 Values whose Sum is 0
题目描述 总时间限制: 15000ms 单个测试点时间限制: 5000ms 内存限制: 228000kB 描述 The SUM problem can be formulated as follows: given four lists A, B, C, D of integer values, c ...
分类:其他好文   时间:2020-04-21 15:23:40    阅读次数:62
24278条   上一页 1 ... 46 47 48 49 50 ... 2428 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!