摘要: Determine if a Sudoku is valid, according to:Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled with ... 阅读全文
posted @ 2014-11-17 15:33 Phoebe815 阅读(145) 评论(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 fo... 阅读全文
posted @ 2014-11-17 14:16 Phoebe815 阅读(108) 评论(0) 推荐(0) 编辑
摘要: Sort a linked list using insertion sort.Solution: 1 /** 2 * Definition for singly-linked list. 3 * public class ListNode { 4 * int val; 5 * ... 阅读全文
posted @ 2014-11-17 08:33 Phoebe815 阅读(101) 评论(0) 推荐(0) 编辑
摘要: Mergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity.Solution 1:PriorityQueue: 1 /** 2 * Definition for si... 阅读全文
posted @ 2014-11-17 07:07 Phoebe815 阅读(123) 评论(0) 推荐(0) 编辑