上一页 1 2 3 4 5 6 ··· 11 下一页
  2015年5月25日
摘要: Sort a linked list in O(n log n) time using constant space complexity. 1 class Solution { 2 public: 3 ListNode *sortList(ListNode *head) 4 { 5... 阅读全文
posted @ 2015-05-25 11:08 黄瓜小肥皂 阅读(125) 评论(0) 推荐(0) 编辑
  2015年5月23日
摘要: Given two strings s and t, determine if they are isomorphic.Two strings are isomorphic if the characters in s can be replaced to get t.All occurrences... 阅读全文
posted @ 2015-05-23 10:51 黄瓜小肥皂 阅读(140) 评论(0) 推荐(0) 编辑
  2015年5月22日
摘要: Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.For exam... 阅读全文
posted @ 2015-05-22 10:36 黄瓜小肥皂 阅读(110) 评论(0) 推荐(0) 编辑
摘要: Write a function to find the longest common prefix string amongst an array of strings. 1 class Solution { 2 public: 3 string longestCommonPrefix(v... 阅读全文
posted @ 2015-05-22 10:19 黄瓜小肥皂 阅读(99) 评论(0) 推荐(0) 编辑
摘要: Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Pana... 阅读全文
posted @ 2015-05-22 09:56 黄瓜小肥皂 阅读(121) 评论(0) 推荐(0) 编辑
摘要: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the c... 阅读全文
posted @ 2015-05-22 08:42 黄瓜小肥皂 阅读(157) 评论(0) 推荐(0) 编辑
  2015年5月21日
摘要: Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree. 1 class Soluti... 阅读全文
posted @ 2015-05-21 23:14 黄瓜小肥皂 阅读(102) 评论(0) 推荐(0) 编辑
摘要: Given inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree. 1 class Solut... 阅读全文
posted @ 2015-05-21 22:35 黄瓜小肥皂 阅读(142) 评论(0) 推荐(0) 编辑
  2015年5月20日
摘要: Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes... 阅读全文
posted @ 2015-05-20 17:23 黄瓜小肥皂 阅读(115) 评论(0) 推荐(0) 编辑
摘要: Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers.... 阅读全文
posted @ 2015-05-20 16:54 黄瓜小肥皂 阅读(218) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 11 下一页