Spurs

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 15 下一页

2017年9月1日

摘要: You 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 cl 阅读全文
posted @ 2017-09-01 11:46 英雄与侠义的化身 阅读(120) 评论(0) 推荐(0) 编辑

摘要: Follow up for "Unique Paths": Now consider if some obstacles are added to the grids. How many unique paths would there be? An obstacle and empty space 阅读全文
posted @ 2017-09-01 11:15 英雄与侠义的化身 阅读(113) 评论(0) 推荐(0) 编辑

摘要: 声明3行4列的数组 cpp const int m = 3, n = 4; vector A(m); // 3 rows for(int i = 0; i 阅读全文
posted @ 2017-09-01 09:34 英雄与侠义的化身 阅读(213) 评论(0) 推荐(0) 编辑

2017年8月31日

摘要: A robot is located at the top left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any p 阅读全文
posted @ 2017-08-31 17:25 英雄与侠义的化身 阅读(151) 评论(0) 推荐(0) 编辑

摘要: 学DP, 从这里开始吧: http://mp.weixin.qq.com/s/0AgJmQNYAKzVOyigXiKQhA 阅读全文
posted @ 2017-08-31 11:36 英雄与侠义的化身 阅读(185) 评论(0) 推荐(0) 编辑

2017年8月29日

摘要: Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given the fo 阅读全文
posted @ 2017-08-29 23:13 英雄与侠义的化身 阅读(156) 评论(0) 推荐(0) 编辑

2017年8月28日

摘要: Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example, Given , The longest consecutive elemen 阅读全文
posted @ 2017-08-28 23:04 英雄与侠义的化身 阅读(148) 评论(0) 推荐(0) 编辑

摘要: 有一个升序排序的数组. For example, Given sorted array , Your function should return length = , with the first five elements of nums being . It doesn't matter wh 阅读全文
posted @ 2017-08-28 21:19 英雄与侠义的化身 阅读(109) 评论(0) 推荐(0) 编辑

摘要: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., might become ). Write a function to determine if 阅读全文
posted @ 2017-08-28 16:51 英雄与侠义的化身 阅读(129) 评论(0) 推荐(0) 编辑

2017年8月27日

摘要: Given an integer $n$, generate a square matrix filled with elements from 1 to $n^2$ in spiral order. For example, Given n = 3, You should return the f 阅读全文
posted @ 2017-08-27 11:14 英雄与侠义的化身 阅读(98) 评论(0) 推荐(0) 编辑

上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 15 下一页