上一页 1 2 3 4 5 6 7 8 ··· 17 下一页

[leetcode]Spiral Matrix II

摘要: Spiral Matrix IIGiven an integern, generate a square matrix filled with elements from 1 ton2in spiral order.For example,Givenn=3,You should return the... 阅读全文
posted @ 2014-08-15 14:54 喵星人与汪星人 阅读(283) 评论(0) 推荐(0) 编辑

[leetcode]Rotate Image

摘要: Rotate ImageYou are given annxn2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?CC上的原题,... 阅读全文
posted @ 2014-08-14 01:08 喵星人与汪星人 阅读(217) 评论(0) 推荐(0) 编辑

[leetcode]String to Integer (atoi)

摘要: String to Integer (atoi)Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, plea... 阅读全文
posted @ 2014-08-14 00:23 喵星人与汪星人 阅读(230) 评论(0) 推荐(0) 编辑

JDK源码分析之String篇

摘要: ------------------------------String在内存中的存储情况(一下内容摘自参考资料1)-----------------------------------前提:先了解下什么是声明,什么时候才算是产生了对象实例其中x并未看到内存分配,变量在使用前必须先声明,再赋值,然后... 阅读全文
posted @ 2014-08-13 01:01 喵星人与汪星人 阅读(3090) 评论(1) 推荐(2) 编辑

[leetcode]Sort Colors

摘要: Sort ColorsGiven an array withnobjects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the or... 阅读全文
posted @ 2014-08-11 21:48 喵星人与汪星人 阅读(250) 评论(0) 推荐(0) 编辑

[leetcode]Search a 2D Matrix

摘要: Search a 2D MatrixWrite an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row... 阅读全文
posted @ 2014-08-11 20:07 喵星人与汪星人 阅读(132) 评论(0) 推荐(0) 编辑

[leetcode]Binary Tree Maximum Path Sum

摘要: Binary Tree Maximum Path SumGiven a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the be... 阅读全文
posted @ 2014-08-11 19:43 喵星人与汪星人 阅读(210) 评论(0) 推荐(0) 编辑

[leetcode]Maximum Subarray

摘要: Maximum SubarrayFind the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array[−... 阅读全文
posted @ 2014-08-10 19:47 喵星人与汪星人 阅读(201) 评论(0) 推荐(0) 编辑

[leetcode]First Missing Positive

摘要: First Missing PositiveGiven an unsorted integer array, find the first missing positive integer.For example,Given[1,2,0]return3,and[3,4,-1,1]return2.Yo... 阅读全文
posted @ 2014-08-09 22:32 喵星人与汪星人 阅读(167) 评论(0) 推荐(0) 编辑

[leetcode]Sudoku Solver

摘要: Sudoku SolverWrite a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the character'.'.You may assume that the... 阅读全文
posted @ 2014-08-09 21:17 喵星人与汪星人 阅读(212) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 17 下一页