lintcode
代码小叶
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
lintcode-44. Minimum Subarray
文章目录1. 问题描述2. my solution2.1 我的思路2.2 代码实现2.3 运行结果3. others solutions3.1 思路一(较差)3.1.1 基本步骤3.2 思路二(较好) 1. 问题描述 Description Given an array of integers, find the continuous subarray with smallest sum. Ret...原创 2020-02-26 20:29:45 · 377 阅读 · 0 评论 -
lintcode-41. Maximum Subarray
文章目录1. 问题描述2. my solution2.1 我的思路2.2 代码实现2.3 运行结果3. others solutions3.1 思路一(较好) 1. 问题描述 Description Given an array of integers, find a contiguous subarray which has the largest sum. The subarray shou...原创 2020-02-26 19:26:04 · 495 阅读 · 0 评论 -
lintcode-39. Recover Rotated Sorted Array
文章目录1. 问题描述2. my solution2.1 我的思路2.2 代码实现2.3 运行结果3. others solutions3.1 思路一 1. 问题描述 2. my solution 2.1 我的思路 遍历数组, 找到分割数组的位置(前数字比后数字小) 根据分割数组的位置来存放数据 时间复杂度为O(n) 2.2 代码实现 class Solution { public: ...原创 2020-02-25 21:22:11 · 432 阅读 · 0 评论 -
lintcode-31. Partition Array
文章目录1. 问题描述2. my solution2.1 我的思路2.2 代码实现2.3 运行结果 1. 问题描述 Given an array nums of integers and an int k, partition the array (i.e move the elements in “nums”) such that: All elements < k are moved ...原创 2020-02-25 20:36:24 · 407 阅读 · 0 评论 -
lintcode-14. First Position of Target
我的方法 public class Solution { /** * @param nums: The integer array. * @param target: Target to find. * @return: The first position of target. Position starts from 0. */ pub...原创 2020-02-25 19:25:01 · 347 阅读 · 0 评论
分享