Timo66

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2015年7月24日

摘要: substringQuestion 1Implement strStr()Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part o... 阅读全文
posted @ 2015-07-24 22:19 Timo66 阅读(214) 评论(0) 推荐(0) 编辑

2015年7月22日

摘要: Add / Divide / Multiply / Power / Plus / SqrtQuestion 1Add Two NumbersYou are given two linked lists representing two non-negative numbers. The digits... 阅读全文
posted @ 2015-07-22 09:09 Timo66 阅读(281) 评论(0) 推荐(0) 编辑

2015年7月21日

摘要: n-sum problemQuestion 2Two SumGiven an array of integers, find two numbers such that they add up to a specific target number.The function twoSum shoul... 阅读全文
posted @ 2015-07-21 21:42 Timo66 阅读(168) 评论(0) 推荐(0) 编辑

2015年7月20日

摘要: Question 1Add BinaryGiven two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".Firslty I wirte a very dire... 阅读全文
posted @ 2015-07-20 22:04 Timo66 阅读(171) 评论(0) 推荐(0) 编辑

摘要: Question1Power of TwoGiven an integer, write a function to determine if it is a power of two.This question is pretty simple. If a number is a power of... 阅读全文
posted @ 2015-07-20 11:06 Timo66 阅读(163) 评论(0) 推荐(0) 编辑

2015年7月18日

摘要: Question 1Reverse IntegerReverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321We need to consider a lot of cases of ... 阅读全文
posted @ 2015-07-18 23:52 Timo66 阅读(209) 评论(0) 推荐(0) 编辑

摘要: Question 1Integer to RomanGiven an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999What we need to not... 阅读全文
posted @ 2015-07-18 02:16 Timo66 阅读(150) 评论(0) 推荐(0) 编辑

2015年7月17日

摘要: Question 1Roman to IntegerGiven a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.This problem is no... 阅读全文
posted @ 2015-07-17 02:52 Timo66 阅读(164) 评论(0) 推荐(0) 编辑

2015年7月15日

摘要: Form today on, I changed to Math module question.Question 1String to Integer (atoi)Implementatoito convert a string to an integer.Remember one thing h... 阅读全文
posted @ 2015-07-15 23:25 Timo66 阅读(146) 评论(0) 推荐(0) 编辑

2015年7月14日

摘要: Question 1.Convert Sorted Array to Binary Search TreeGiven an array where elements are sorted in ascending order, convert it to a height balanced BST.... 阅读全文
posted @ 2015-07-14 22:20 Timo66 阅读(125) 评论(0) 推荐(0) 编辑