![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode
文章平均质量分 65
Joy_Shen
You are in the picture
展开
-
【LeetCode】Wiggle Sort II
Given an unsorted array nums, reorder it such that nums[0] < nums[1] > nums[2] < nums[3]….Example 1: Input: nums = [1, 5, 1, 1, 6, 4] Output: One possible answer is [1, 4, 1, 5, 1, 6]. E...原创 2018-07-26 20:32:29 · 438 阅读 · 0 评论 -
【LeetCode】记录几个动态规划(DP)题目
[LeetCode] Coin Change 硬币找零 You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you need to make up that amo...原创 2018-07-24 20:15:34 · 1286 阅读 · 0 评论 -
【LeetCode】Anagrams(笔记)
DescriptionGiven an array of strings, return all groups of strings that are anagrams.ExampleGiven ["lint", "intl", "inlt", "code"], return ["lint", "inlt", "intl"].Given ["a原创 2017-09-07 18:27:13 · 349 阅读 · 0 评论 -
【LintCode】Sort List(笔记)
DescriptionSort a linked list in O(n log n) time using constant space complexity.ExampleGiven 1->3->2->null, sort it to 1->2->3->null.Notes主要思想就是如何对链表作归并排序。1.归并排序的思想2.寻...原创 2017-09-01 17:52:47 · 292 阅读 · 0 评论 -
【LintCode】Climbing Stairs(笔记)
DescriptionYou are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?ExampleGiven an e...原创 2017-08-31 20:16:42 · 361 阅读 · 0 评论 -
【LintCode】Max Points on a Line(笔记)
DescriptionGiven n points on a 2D plane, find the maximum number of points that lie on the same straight line.(二维平面上有n个点,求出共线的最多点数)ExampleGiven 4 points: (1,2), (3,6), (0,0), (1,3).The maxim...原创 2017-08-31 18:37:41 · 341 阅读 · 0 评论