- 博客(4)
- 收藏
- 关注
原创 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 147
原创 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 327 1
原创 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 372
原创 CSUOJ-1044: 扑克排序
Description一叠数值不同的扑克牌(不超过13张),每次只能拿最顶端的一张插入到任意位置。至少操作多少次,扑克牌能够从上到下是从大到小的顺序。Input 多组数据,每组第一行为n,扑克牌个数。第二行n个空格隔开的正整数,(这些数是1~13),为这叠扑克牌从下到上的数值。Output 每组数据输出一行,至少按规则操作的次数。Samp
2017-05-24 23:09:22 774
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人