上一页 1 ··· 6 7 8 9 10 11 12 13 下一页
摘要: Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, please do not see below and ... 阅读全文
posted @ 2014-11-07 00:13 Agentgamer 阅读(121) 评论(0) 推荐(0)
摘要: Write a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the character'.'.You may assume that there will be on... 阅读全文
posted @ 2014-11-04 09:10 Agentgamer 阅读(201) 评论(0) 推荐(0)
摘要: Determine if a Sudoku is valid, according to:Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled with ... 阅读全文
posted @ 2014-11-04 09:10 Agentgamer 阅读(118) 评论(0) 推荐(0)
摘要: Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth... 阅读全文
posted @ 2014-10-29 13:41 Agentgamer 阅读(135) 评论(0) 推荐(0)
摘要: You are climbing a stair case. It takesnsteps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb... 阅读全文
posted @ 2014-10-26 22:53 Agentgamer 阅读(144) 评论(0) 推荐(0)
摘要: Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or... 阅读全文
posted @ 2014-10-26 20:56 Agentgamer 阅读(128) 评论(0) 推荐(0)
摘要: Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu... 阅读全文
posted @ 2014-10-26 20:34 Agentgamer 阅读(192) 评论(0) 推荐(0)
摘要: Write a function to find the longest common prefix string amongst an array of strings.题目言简意赅,貌似也不难,暴力法用一个char *数组存放strs里每个元素的起始地址,然后循环,同时把所有指针向前移动,如果有... 阅读全文
posted @ 2014-10-25 00:23 Agentgamer 阅读(131) 评论(0) 推荐(0)
摘要: Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4, 200, 1, 3, 2],The longest ... 阅读全文
posted @ 2014-10-24 22:32 Agentgamer 阅读(186) 评论(0) 推荐(0)
摘要: Given a stringsand a dictionary of wordsdict, add spaces insto construct a sentence where each word is a valid dictionary word.Return all such possibl... 阅读全文
posted @ 2014-10-24 11:50 Agentgamer 阅读(281) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 下一页