ARTS
留得住时间留不住你
这个作者很懒,什么都没留下…
展开
-
ARTS 计划 第一周打卡
LeetCodeLeetCode 862. 和至少为 K 的最短子数组返回 A 的最短的非空连续子数组的长度,该子数组的和至少为 K 。如果没有和至少为 K 的非空子数组,返回 -1 。示例 1:输入:A = [1], K = 1输出:1示例 2:输入:A = [1,2], K = 4输出:-1示例 3:输入:A = [2,-1,2], K = 3输出:3提示:1 &l...原创 2019-03-24 15:01:28 · 302 阅读 · 0 评论 -
ARTS 第三周
Algorithm15.三数之和给定一个包含 n 个整数的数组 nums,判断 nums 中是否存在三个元素 a,b,c ,使得 a + b + c = 0 ?找出所有满足条件且不重复的三元组。注意:答案中不可以包含重复的三元组。例如, 给定数组 nums = [-1, 0, 1, 2, -1, -4],满足要求的三元组集合为:[[-1, 0, 1],[-1, -1, 2]]思...原创 2019-04-07 17:37:21 · 154 阅读 · 0 评论 -
ARTS 第二周
AlgorithmLeetCode 23 合并K个排序链表合并 k 个排序链表,返回合并后的排序链表。请分析和描述算法的复杂度。示例:输入:[1->4->5,1->3->4,2->6]输出: 1->1->2->3->4->4->5->6思路:每次合并两个链表,直到最后只有一条列表。class Solut...原创 2019-04-02 17:07:21 · 171 阅读 · 0 评论 -
ARTS 第四周
Algorithm442.Find All Duplicates in an ArrayGiven an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.Find all the elements that appear twice i...原创 2019-04-16 23:51:56 · 145 阅读 · 0 评论 -
ARTS第六周
Algorithm198 . House RobberYou are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each ...原创 2019-05-05 21:29:24 · 106 阅读 · 0 评论 -
ARTS 第五周
Algorithmleetcode 976. Largest Perimeter TriangleGiven an array A of positive lengths, return the largest perimeter of a triangle with non-zero area, formed from 3 of these lengths.If it is impossi...原创 2019-04-30 19:26:35 · 95 阅读 · 0 评论 -
ARTS第八周
AlgorithmLeetCode 1019. Next Greater Node In Linked ListWe are given a linked list with head as the first node. Let’s number the nodes in the list: node_1, node_2, node_3, … etc.Each node may have...原创 2019-05-21 15:06:28 · 169 阅读 · 0 评论 -
ARTS第七周
AlgorithmLeetcode 26. Remove Duplicates from Sorted ArrayGiven a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length.Do not allocate ...原创 2019-05-12 20:48:57 · 156 阅读 · 0 评论