Chinaunix首页 | 论坛 | 博客
  • 博客访问: 270204
  • 博文数量: 170
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1709
  • 用 户 组: 普通用户
  • 注册时间: 2014-05-06 18:01
文章分类

全部博文(170)

文章存档

2016年(11)

2015年(130)

2014年(29)

发布时间:2015-03-17 11:03:40

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 from left to right.The first integer of each row is greater than the last integer of the previous row..........【阅读全文】

阅读(156) | 评论(0) | 转发(0)

发布时间:2015-03-16 10:54:26

Given two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size that is greater or equal to m + n) to hold additional elements from B. The number of elements initialized in A and B are mand n respectiv.........【阅读全文】

阅读(203) | 评论(0) | 转发(0)

发布时间:2015-03-15 13:34:51

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 ], [ 7, 6, 5 ]] public int[][] generateMatrix(int n) {  &n.........【阅读全文】

阅读(201) | 评论(0) | 转发(0)

发布时间:2015-03-15 10:43:01

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:[ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9 ]]You should return [1,2,3,6,9,8,7,4,5].public static List<Integer> spiralOrder(int[][] matr.........【阅读全文】

阅读(231) | 评论(0) | 转发(0)

发布时间:2015-03-07 11:10:30

Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.The same repeated number may be chosen from C unlimited number of times.Note:All numbers (including target) will .........【阅读全文】

阅读(348) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册