上一页 1 2 3 4 5 6 7 ··· 11 下一页
  2015年5月20日
摘要: Given a range [m, n] where 0 >1;10 n=n>>1;11 p++;12 }13 14 return m<<p;15 }16 }; 阅读全文
posted @ 2015-05-20 16:28 黄瓜小肥皂 阅读(108) 评论(0) 推荐(0) 编辑
  2015年5月19日
摘要: Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximu... 阅读全文
posted @ 2015-05-19 17:29 黄瓜小肥皂 阅读(158) 评论(0) 推荐(0) 编辑
摘要: Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the fol... 阅读全文
posted @ 2015-05-19 16:56 黄瓜小肥皂 阅读(138) 评论(0) 推荐(0) 编辑
  2015年5月18日
摘要: 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 @ 2015-05-18 14:39 黄瓜小肥皂 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, remove the nth node from the end of list and return its head.For example,Given linked list: 1->2->3->4->5, and n = 2. After remov... 阅读全文
posted @ 2015-05-18 13:33 黄瓜小肥皂 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.You should preserve the o... 阅读全文
posted @ 2015-05-18 13:18 黄瓜小肥皂 阅读(98) 评论(0) 推荐(0) 编辑
  2015年5月17日
摘要: Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the ord... 阅读全文
posted @ 2015-05-17 18:02 黄瓜小肥皂 阅读(117) 评论(0) 推荐(0) 编辑
摘要: Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. 1 class Solution { 2 public: 3 int l... 阅读全文
posted @ 2015-05-17 17:13 黄瓜小肥皂 阅读(119) 评论(0) 推荐(0) 编辑
  2015年5月16日
摘要: Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear time/space.Return 0 ... 阅读全文
posted @ 2015-05-16 18:08 黄瓜小肥皂 阅读(131) 评论(0) 推荐(0) 编辑
摘要: The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1 is read off as "one 1" or 11.11 is read off ... 阅读全文
posted @ 2015-05-16 17:49 黄瓜小肥皂 阅读(128) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 11 下一页