【题目】
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 ...
分类:
其他好文 时间:
2014-06-05 08:28:43
阅读次数:
321
You are given annxn2D matrix representing an
image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this
in-place?classSolution{publi...
分类:
其他好文 时间:
2014-06-04 20:25:09
阅读次数:
227
Given a matrix ofmxnelements (mrows,ncolumns),
return all elements of the matrix in spiral order.For example,Given the
following matrix:[ [ 1, 2, 3 ]....
分类:
其他好文 时间:
2014-06-04 20:06:52
阅读次数:
256
Given an integern, generate a square matrix
filled with elements from 1 ton2in spiral order.For example,Givenn=3,You should
return the following matri...
分类:
其他好文 时间:
2014-06-04 19:28:23
阅读次数:
220
RSSI=Received Signal Strength Indication which
generally appears as "bars" in our software. It indicates how much power is in
the radio signal your ro...
分类:
其他好文 时间:
2014-06-03 12:20:59
阅读次数:
529
Speaking Tips from Popular TED Talks1. best
practices in presenting THE2. Knowledge is power. Pass it on. Click this button
to share information on ea...
分类:
其他好文 时间:
2014-05-30 19:39:38
阅读次数:
417
Fast Matrix OperationsThere is a matrix
containing at most 106elements divided into r rows and c columns. Each element
has a location (x,y) where 10)2...
分类:
其他好文 时间:
2014-05-30 03:31:23
阅读次数:
516
Rotate ImageYou 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?最简...
分类:
其他好文 时间:
2014-05-29 23:02:38
阅读次数:
254
class Solution { public: vector
spiralOrder(vector > &matrix) { vector ret; int cols = 0; ...
分类:
其他好文 时间:
2014-05-28 14:38:02
阅读次数:
236
class Solution { public: vector >
generateMatrix(int n) { vector > matrix; if (n (n, 0)); }...
分类:
其他好文 时间:
2014-05-28 09:42:14
阅读次数:
233