发布时间:2015-03-20 15:28:48
Combinations Total Accepted: 36487 Total Submissions: 119636My SubmissionsQuestion Solution Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.Fo.........【阅读全文】
发布时间: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..........【阅读全文】
发布时间: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.........【阅读全文】
发布时间: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.........【阅读全文】