文章 2023-01-11 来自:开发者社区

LeetCode 167 Two Sum II - Input array is sorted(输入已排序数组,求其中两个数的和等于给定的数)

Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers s....

文章 2022-02-16 来自:开发者社区

leetCode 1. Two Sum 数组

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 exactly one solution....

文章 2022-02-16 来自:开发者社区

[LeetCode] Minimum Size Subarray Sum 最短子数组之和

Given an array of n positive integers and a positive integer s, find the minimal length of a subarray of which the sum ≥ s. If there isn't one, return 0 instead. For example, given...

文章 2022-02-16 来自:开发者社区

[LeetCode] Two Sum II - Input array is sorted 两数之和之二 - 输入数组有序

Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers ....

文章 2022-02-16 来自:开发者社区

[LeetCode] Maximum Size Subarray Sum Equals k 最大子数组之和为k

Given an array nums and a target value k, find the maximum length of a subarray that sums to k. If there isn't one, return 0 instead. Example 1: Given nums = [1, -1,...

文章 2022-02-16 来自:开发者社区

[LeetCode] Split Array Largest Sum 分割数组的最大值

Given an array which consists of non-negative integers and an integer m, you can split the array into m non-empty continuous subarrays. Write an algorithm to minimize the largest sum am...

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。

算法编程

开发者社区在线编程频道官方技术圈。包含算法资源更新,周赛动态,每日一题互动。

+关注