摘要:
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... 阅读全文
posted @ 2015-02-09 14:36
Vae永Silence
阅读(120)
评论(0)
推荐(0)
摘要:
The set[1,2,3,…,n]contains a total ofn! unique permutations.By listing and labeling all of the permutations in order,We get the following sequence (ie... 阅读全文
posted @ 2015-02-09 14:35
Vae永Silence
阅读(108)
评论(0)
推荐(0)
摘要:
Given a list, rotate the list to the right bykplaces, wherekis non-negative.For example:Given1->2->3->4->5->NULLandk=2,return4->5->1->2->3->NULL./** *... 阅读全文
posted @ 2015-02-09 14:34
Vae永Silence
阅读(153)
评论(0)
推荐(0)
摘要:
A robot is located at the top-left corner of amxngrid (marked 'Start' in the diagram below).The robot can only move either down or right at any point ... 阅读全文
posted @ 2015-02-09 14:33
Vae永Silence
阅读(134)
评论(0)
推荐(0)
摘要:
Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space i... 阅读全文
posted @ 2015-02-09 14:32
Vae永Silence
阅读(139)
评论(0)
推荐(0)
摘要:
Given amxngrid filled with non-negative numbers, find a path from top left to bottom right whichminimizesthe sum of all numbers along its path.Note:Yo... 阅读全文
posted @ 2015-02-09 14:31
Vae永Silence
阅读(104)
评论(0)
推荐(0)
摘要:
Validate if a given string is numeric.Some examples:"0"=>true" 0.1 "=>true"abc"=>false"1 a"=>false"2e10"=>trueNote:It is intended for the problem stat... 阅读全文
posted @ 2015-02-09 14:30
Vae永Silence
阅读(151)
评论(0)
推荐(0)
摘要:
Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at... 阅读全文
posted @ 2015-02-09 14:29
Vae永Silence
阅读(114)
评论(0)
推荐(0)
摘要:
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".class Solution {public:string addBinary(string ... 阅读全文
posted @ 2015-02-09 14:28
Vae永Silence
阅读(120)
评论(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 should p... 阅读全文
posted @ 2015-02-09 14:27
Vae永Silence
阅读(125)
评论(0)
推荐(0)