上一页 1 2 3 4 5 6 7 8 ··· 36 下一页
摘要: Design and implement a TwoSum class. It should support the following operations: add and find. add - Add the number to an internal data structure. fin 阅读全文
posted @ 2016-09-10 04:36 LiBlog 阅读(112) 评论(0) 推荐(0) 编辑
摘要: Design a data structure that supports the following two operations: search(word) can search a literal word or a regular expression string containing o 阅读全文
posted @ 2016-09-10 02:29 LiBlog 阅读(161) 评论(0) 推荐(0) 编辑
摘要: Find the length of the longest substring T of a given string (consists of lowercase letters only) such that every character in T appears no less than 阅读全文
posted @ 2016-09-09 14:21 LiBlog 阅读(277) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty string str and an integer k, rearrange the string such that the same characters are at least distance k from each other. All input s 阅读全文
posted @ 2016-09-09 13:02 LiBlog 阅读(194) 评论(0) 推荐(0) 编辑
摘要: According to the Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John 阅读全文
posted @ 2016-09-09 08:30 LiBlog 阅读(166) 评论(0) 推荐(0) 编辑
摘要: You are given a m x n 2D grid initialized with these three possible values. Fill each empty room with the distance to its nearest gate. If it is impos 阅读全文
posted @ 2016-09-09 08:26 LiBlog 阅读(123) 评论(0) 推荐(0) 编辑
摘要: You are given two jugs with capacities x and y litres. There is an infinite amount of water supply available. You need to determine whether it is poss 阅读全文
posted @ 2016-09-04 14:25 LiBlog 阅读(153) 评论(0) 推荐(0) 编辑
摘要: Given a binary search tree and a node in it, find the in-order successor of that node in the BST. Note: If the given node has no in-order successor in 阅读全文
posted @ 2016-09-04 14:04 LiBlog 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted i 阅读全文
posted @ 2016-09-04 13:49 LiBlog 阅读(111) 评论(0) 推荐(0) 编辑
摘要: Suppose you are at a party with n people (labeled from 0 to n - 1) and among them, there may exist one celebrity. The definition of a celebrity is tha 阅读全文
posted @ 2016-09-04 11:34 LiBlog 阅读(88) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 36 下一页