摘要:
substringQuestion 1Implement strStr()Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part o... 阅读全文
摘要:
substringQuestion 1Implement strStr()Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part o... 阅读全文
摘要:
Add / Divide / Multiply / Power / Plus / SqrtQuestion 1Add Two NumbersYou are given two linked lists representing two non-negative numbers. The digits... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
Question 1Reverse IntegerReverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321We need to consider a lot of cases of ... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
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.... 阅读全文
|