35. Search Insert Position

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 o...

2018-01-31 21:23:54

阅读数:12

评论数:0

28. Implement strStr()

Implement strStr(). Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Example 1: Input: hay...

2018-01-31 20:27:42

阅读数:13

评论数:0

27. Remove Element

Given an array and a value, remove all instances of that value in-place and return the new length. Do not allocate extra space for another array, yo...

2018-01-31 17:32:14

阅读数:12

评论数:0

26.Remove Duplicates from Sorted Array

Given a sorted array, remove the duplicates in-place such that each element appear only once and return the new length. Do not allocate extra space ...

2018-01-30 22:18:29

阅读数:36

评论数:0

21.Merge Two Sorted Lists

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. Ex...

2018-01-30 22:15:41

阅读数:22

评论数:0

20. Valid Parentheses

Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close i...

2018-01-28 22:49:28

阅读数:20

评论数:0

14. Longest Common Prefix

Write a function to find the longest common prefix string amongst an array of strings. "abcdefg""abcdefghijk""abcdfghijk&qu...

2018-01-28 22:03:35

阅读数:17

评论数:0

13. Roman to Integer(运行时间有待改进)

Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 罗马数字是最古老的数字表示方式,比阿拉伯数组早2000多年,起...

2018-01-27 23:03:42

阅读数:20

评论数:0

9. Palindrome Number

Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you a...

2018-01-27 21:48:56

阅读数:38

评论数:0

7. Reverse Integer

Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 321 Example 2: Input: -123 Output: -321 ...

2018-01-26 20:46:26

阅读数:23

评论数:0

1. Two Sum

Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would hav...

2018-01-26 19:59:52

阅读数:35

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭