摘要: 此博客链接: 两个数的和 题目链接:https://leetcode-cn.com/problems/two-sum/ 题目 给定一个整数数组 nums 和一个整数目标值 target,请你在该数组中找出 和为目标值 target 的那 两个 整数,并返回它们的数组下标。 你可以假设每种输入只会对应 阅读全文
posted @ 2021-08-02 16:07 萍2樱释 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 此博客链接: 最大子序和 题目链接:https://leetcode-cn.com/problems/maximum-subarray/ 题目 给定一个整数数组 nums ,找到一个具有最大和的连续子数组(子数组最少包含一个元素),返回其最大和。 示例 1: 输入:nums = [-2,1,-3,4 阅读全文
posted @ 2021-08-02 15:43 萍2樱释 阅读(12) 评论(0) 推荐(0) 编辑