LeetCode
文章平均质量分 63
OranKitch
这个作者很懒,什么都没留下…
展开
-
324. Wiggle Sort II
Given an unsorted array nums, reorder it such that nums[0] nums[2] .Example:(1) Given nums = [1, 5, 1, 1, 6, 4], one possible answer is [1, 4, 1, 5, 1, 6]. (2) Given nums = [1, 3, 2, 2, 3原创 2017-09-18 23:08:37 · 370 阅读 · 0 评论 -
59. Spiral Matrix II
Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.For example,Given n = 3,You should return the following matrix:[ [ 1, 2, 3 ], [ 8, 9, 4 ], [原创 2017-09-18 23:46:59 · 324 阅读 · 1 评论 -
746. Min Cost Climbing Stairs
On a staircase, the i-th step has some non-negative cost cost[i] assigned (0 indexed).Once you pay the cost, you can either climb one or two steps. You need to find minimum cost to reach the top of th...原创 2018-03-27 21:24:40 · 143 阅读 · 0 评论