上一页 1 2 3 4 5 6 7 8 9 ··· 18 下一页
摘要: Design a logger system that receive stream of messages along with its timestamps, each message should be printed if and only if it is not printed in t 阅读全文
posted @ 2016-08-15 02:28 fenshen371 阅读(162) 评论(0) 推荐(0) 编辑
摘要: You are playing the following Flip Game with your friend: Given a string that contains only these two characters: + and -, you and your friend take tu 阅读全文
posted @ 2016-08-14 12:26 fenshen371 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Given a string, we can "shift" each of its letter to its successive letter, for example: "abc" -> "bcd". We can keep "shifting" which forms the sequen 阅读全文
posted @ 2016-08-14 12:18 fenshen371 阅读(107) 评论(0) 推荐(0) 编辑
摘要: Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-index. According 阅读全文
posted @ 2016-08-14 02:36 fenshen371 阅读(115) 评论(0) 推荐(0) 编辑
摘要: There is a fence with n posts, each post can be painted with one of the k colors. You have to paint all the posts such that no more than two adjacent 阅读全文
posted @ 2016-08-13 12:31 fenshen371 阅读(185) 评论(0) 推荐(0) 编辑
摘要: An abbreviation of a word follows the form <first letter><number><last letter>. Below are some examples of word abbreviations: a) it --> it (no abbrev 阅读全文
posted @ 2016-08-13 12:02 fenshen371 阅读(193) 评论(0) 推荐(0) 编辑
摘要: Given a stream of integers and a window size, calculate the moving average of all integers in the sliding window. For example, 阅读全文
posted @ 2016-08-13 10:56 fenshen371 阅读(130) 评论(0) 推荐(0) 编辑
摘要: A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside down). Write a function to determine if a number i 阅读全文
posted @ 2016-08-13 10:40 fenshen371 阅读(111) 评论(0) 推荐(0) 编辑
摘要: We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You have to guess which number I picked. Every time you guess wron 阅读全文
posted @ 2016-08-13 10:18 fenshen371 阅读(132) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find the maximum path sum. For this problem, a path is defined as any sequence of nodes from some starting node to any node in th 阅读全文
posted @ 2016-05-08 05:39 fenshen371 阅读(139) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 18 下一页