上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 30 下一页
摘要: Given two words (startandend), and a dictionary, find the length of shortest transformation sequence fromstarttoend, such that:Only one letter can be ... 阅读全文
posted @ 2015-04-08 12:23 Eason Liu 阅读(314) 评论(0) 推荐(0) 编辑
摘要: 时间限制:10000ms单点时限:1000ms内存限制:256MB描述万圣节的早上,小Hi和小Ho在经历了一个小时的争论后,终于决定了如何度过这样有意义的一天——他们决定去闯鬼屋!在鬼屋门口排上了若干小时的队伍之后,刚刚进入鬼屋的小Hi和小Ho都颇饥饿,于是他们决定利用进门前领到的地图,找到一条通往... 阅读全文
posted @ 2015-04-07 17:17 Eason Liu 阅读(612) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, imagine yourself standing on therightside of it, return the values of the nodes you can see ordered from top to bottom.For exampl... 阅读全文
posted @ 2015-04-05 00:04 Eason Liu 阅读(219) 评论(0) 推荐(0) 编辑
摘要: Given an array withnobjects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, wh... 阅读全文
posted @ 2015-04-01 16:26 Eason Liu 阅读(319) 评论(0) 推荐(0) 编辑
摘要: You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping yo... 阅读全文
posted @ 2015-04-01 15:31 Eason Liu 阅读(203) 评论(0) 推荐(0) 编辑
摘要: Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa... 阅读全文
posted @ 2015-03-30 22:04 Eason Liu 阅读(194) 评论(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-03-27 13:44 Eason Liu 阅读(234) 评论(0) 推荐(0) 编辑
摘要: Maximum GapGiven an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear time/spac... 阅读全文
posted @ 2015-03-21 16:15 Eason Liu 阅读(1031) 评论(0) 推荐(0) 编辑
摘要: Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321click to show spoilers.Have you thought about this?Here are som... 阅读全文
posted @ 2015-03-21 13:54 Eason Liu 阅读(170) 评论(0) 推荐(0) 编辑
摘要: Implement pow(x,n).注意n等于INT_MIN的时候,直接让n = -n会整形溢出.二分法: 1 class Solution { 2 public: 3 double pow(double x, int n) { 4 if (n == 0) return 1... 阅读全文
posted @ 2015-03-21 13:30 Eason Liu 阅读(142) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 30 下一页