Spurs

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

2017年8月26日

摘要: Given an array of non negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maxim 阅读全文
posted @ 2017-08-26 17:00 英雄与侠义的化身 阅读(114) 评论(0) 推荐(0) 编辑

摘要: Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. For example, Given the following matrix: You 阅读全文
posted @ 2017-08-26 15:38 英雄与侠义的化身 阅读(81) 评论(0) 推荐(0) 编辑

2017年8月24日

摘要: You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Follow up: Could you do this in place? 方阵顺时针旋转90度, 阅读全文
posted @ 2017-08-24 12:58 英雄与侠义的化身 阅读(92) 评论(0) 推荐(0) 编辑

2017年8月22日

摘要: Given an array of integers sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime complexi 阅读全文
posted @ 2017-08-22 19:05 英雄与侠义的化身 阅读(112) 评论(0) 推荐(0) 编辑

摘要: Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array whic 阅读全文
posted @ 2017-08-22 12:12 英雄与侠义的化身 阅读(95) 评论(0) 推荐(0) 编辑

摘要: Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. 阅读全文
posted @ 2017-08-22 10:44 英雄与侠义的化身 阅读(103) 评论(0) 推荐(0) 编辑

2017年8月21日

摘要: Given an unsorted integer array, find the first missing positive integer. For example , Your algorithm should run in $O(n)$ time and uses constant spa 阅读全文
posted @ 2017-08-21 18:19 英雄与侠义的化身 阅读(105) 评论(0) 推荐(0) 编辑

摘要: Given an array of integers, (n = size of array), some elements appear twice and others appear once . Find all the elements that appear twice in this a 阅读全文
posted @ 2017-08-21 11:55 英雄与侠义的化身 阅读(114) 评论(0) 推荐(0) 编辑

2017年8月20日

摘要: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., might become ). You are given a target value to 阅读全文
posted @ 2017-08-20 12:10 英雄与侠义的化身 阅读(139) 评论(0) 推荐(0) 编辑

2017年8月19日

摘要: Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted f 阅读全文
posted @ 2017-08-19 18:43 英雄与侠义的化身 阅读(137) 评论(0) 推荐(0) 编辑

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