上一页 1 ··· 6 7 8 9 10 11 12 13 下一页
摘要: Given an array of integers, every element appearsthreetimes except for one. Find that single one.Note:Your algorithm should have a linear runtime comp... 阅读全文
posted @ 2015-01-15 22:29 胡潇 阅读(186) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complexity... 阅读全文
posted @ 2015-01-15 22:19 胡潇 阅读(128) 评论(0) 推荐(0) 编辑
摘要: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.解题:普通做法三步... 阅读全文
posted @ 2015-01-15 22:13 胡潇 阅读(153) 评论(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 @ 2015-01-15 22:09 胡潇 阅读(170) 评论(0) 推荐(0) 编辑
摘要: Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.解题:本题为典型的KMP算法考察题,KMP算法描述为... 阅读全文
posted @ 2015-01-15 21:56 胡潇 阅读(182) 评论(0) 推荐(0) 编辑
摘要: Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.解题:将字符形式的罗马数字,转化为整形。输入在1~3999之间。罗马数字的书写规范,请参... 阅读全文
posted @ 2015-01-15 21:54 胡潇 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 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 @ 2015-01-15 05:58 胡潇 阅读(155) 评论(0) 推荐(0) 编辑
摘要: Given a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must close in the correct ... 阅读全文
posted @ 2015-01-14 23:41 胡潇 阅读(154) 评论(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 @ 2015-01-14 04:06 胡潇 阅读(158) 评论(0) 推荐(0) 编辑
摘要: Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at... 阅读全文
posted @ 2015-01-13 06:42 胡潇 阅读(200) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 下一页