上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 36 下一页
摘要: You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 ston 阅读全文
posted @ 2016-03-28 08:54 LiBlog 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Analysis:For target>A[mid]:There is only one case that we should seach [start,mid-1]: Peak is in the left, i.e., A[start]>A[mid] && target>=A[start].F... 阅读全文
posted @ 2015-01-20 07:13 LiBlog 阅读(161) 评论(0) 推荐(0) 编辑
摘要: Given amxngrid filled with non-negative numbers, find a path from top left to bottom right whichminimizesthe sum of all numbers along its path. ... 阅读全文
posted @ 2015-01-09 08:49 LiBlog 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 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-01-09 08:07 LiBlog 阅读(262) 评论(0) 推荐(0) 编辑
摘要: Design an algorithm and write code to serialize and deserialize a binary tree. Writing the tree to a file is called 'serialization' and reading back f... 阅读全文
posted @ 2015-01-08 12:37 LiBlog 阅读(469) 评论(0) 推荐(0) 编辑
摘要: Given an input string, reverse the string word by word. For example,Given s = "the sky is blue",return "blue is sky the".click to show clarification.C... 阅读全文
posted @ 2015-01-05 07:44 LiBlog 阅读(156) 评论(0) 推荐(0) 编辑
摘要: Given a singly linked list L: 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 ... 阅读全文
posted @ 2015-01-05 07:33 LiBlog 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.For e... 阅读全文
posted @ 2015-01-05 07:04 LiBlog 阅读(224) 评论(0) 推荐(0) 编辑
摘要: Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that:Only one letter ca... 阅读全文
posted @ 2015-01-05 06:47 LiBlog 阅读(145) 评论(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: Pan... 阅读全文
posted @ 2015-01-05 06:40 LiBlog 阅读(142) 评论(0) 推荐(0) 编辑
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 36 下一页