摘要: Divide two integers without using multiplication, division and mod operator. If it is overflow, return 2147483647 Example Given dividend = 100 and div 阅读全文
posted @ 2016-07-13 22:39 北叶青藤 阅读(158) 评论(0) 推荐(0) 编辑
摘要: Determine whether a Sudoku is valid. The Sudoku board could be partially filled, where empty cells are filled with the character .. Notice A valid Sud 阅读全文
posted @ 2016-07-13 12:02 北叶青藤 阅读(203) 评论(0) 推荐(0) 编辑
摘要: Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last word 阅读全文
posted @ 2016-07-13 11:13 北叶青藤 阅读(152) 评论(0) 推荐(0) 编辑
摘要: Valid Parentheses Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. Example The b 阅读全文
posted @ 2016-07-13 11:03 北叶青藤 阅读(254) 评论(0) 推荐(0) 编辑
摘要: Implement pow(x, n). Notice You don't need to care about the precision of your answer, it's acceptable if the expected answer and your answer 's diffe 阅读全文
posted @ 2016-07-13 10:43 北叶青藤 阅读(169) 评论(0) 推荐(0) 编辑
摘要: Given a boolean 2D matrix, find the number of islands. Notice 0 is represented as the sea, 1 is represented as the island. If two 1 is adjacent, we co 阅读全文
posted @ 2016-07-13 10:39 北叶青藤 阅读(226) 评论(0) 推荐(0) 编辑
摘要: Given a string containing only digits, restore it by returning all possible valid IP address combinations. Given a string containing only digits, rest 阅读全文
posted @ 2016-07-13 09:56 北叶青藤 阅读(201) 评论(0) 推荐(0) 编辑
摘要: Design a data structure that supports the following two operations: addWord(word) andsearch(word) search(word) can search a literal word or a regular 阅读全文
posted @ 2016-07-13 05:58 北叶青藤 阅读(249) 评论(0) 推荐(0) 编辑
摘要: Design a simplified version of Twitter where users can post tweets, follow/unfollow another user and is able to see the 10 most recent tweets in the u 阅读全文
posted @ 2016-07-13 02:00 北叶青藤 阅读(259) 评论(0) 推荐(0) 编辑