2015年6月9日

摘要: 题目:Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line.代码:/** * Definition for a point. * struct Point { ... 阅读全文
posted @ 2015-06-09 23:46 承续缘 阅读(201) 评论(0) 推荐(0)
摘要: 题目:Given an array of words and a lengthL, format the text such that each line has exactlyLcharacters and is fully (left and right) justified.You shoul... 阅读全文
posted @ 2015-06-09 22:43 承续缘 阅读(206) 评论(0) 推荐(0)
摘要: 题目:Divide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INT.代码:class Solution {public: int div... 阅读全文
posted @ 2015-06-09 15:23 承续缘 阅读(303) 评论(0) 推荐(0)
摘要: 题目:The string"PAYPALISHIRING"is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font... 阅读全文
posted @ 2015-06-09 09:54 承续缘 阅读(200) 评论(0) 推荐(0)
摘要: 题目:Given an integern, generate a square matrix filled with elements from 1 ton2in spiral order.For example,Givenn=3,You should return the following ma... 阅读全文
posted @ 2015-06-09 08:21 承续缘 阅读(170) 评论(0) 推荐(0)
摘要: 题目:Given a matrix ofmxnelements (mrows,ncolumns), return all elements of the matrix in spiral order.For example,Given the following matrix:[ [ 1, 2, 3... 阅读全文
posted @ 2015-06-09 07:54 承续缘 阅读(280) 评论(0) 推荐(0)

导航