上一页 1 2 3 4 5 6 7 8 9 ··· 19 下一页
摘要: Given a strings, partitionssuch that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning ofs... 阅读全文
posted @ 2014-11-24 11:02 Phoebe815 阅读(246) 评论(0) 推荐(0) 编辑
摘要: Givennnon-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histog... 阅读全文
posted @ 2014-11-23 16:25 Phoebe815 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".Solution: 1 public class Solution { 2 publi... 阅读全文
posted @ 2014-11-20 16:48 Phoebe815 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.For example,Given1->2->3-... 阅读全文
posted @ 2014-11-18 04:36 Phoebe815 阅读(134) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a multiple ofkthen left-o... 阅读全文
posted @ 2014-11-18 02:16 Phoebe815 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 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) 编辑
摘要: Given a singly linked listL:L0→L1→…→Ln-1→Ln,reorder it to:L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' values.For exam... 阅读全文
posted @ 2014-11-16 17:11 Phoebe815 阅读(149) 评论(1) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 19 下一页