![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
坚持就是胜利
susielau1998
这个作者很懒,什么都没留下…
展开
-
LeetCode | 1. Two Sum
LeetCode | 1. TwoSumDescriptionFor Loops | 暴力解题法Hash Table | 聪明的哈希表One Loop Hash Table | 精简哈希表 Description Given an array of integers, return indices of the two numbers such that they add up to a spec...原创 2019-01-01 08:32:08 · 165 阅读 · 0 评论 -
LeetCode | 20. Valid Parentheses
Description Given a string containing just the characters ‘(’, ‘)’, ‘{’, ‘}’, ‘[’ and ‘]’, determine if the input string is valid. An input string is valid if: Open brackets must be closed by the same...原创 2019-01-02 12:05:59 · 75 阅读 · 0 评论 -
LeetCode | 14. Longest Common Prefix
Description Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string “”. Example 1: Input: ["flower","flow","flight"]..原创 2019-01-02 11:41:49 · 103 阅读 · 1 评论 -
LeetCode | 13. Roman to Integer
Description Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V 5 X 10 L 50 C 100 D 500 M 1000 For example, two is written as II...原创 2019-01-02 10:22:40 · 99 阅读 · 0 评论 -
LeetCode | 28. Implement strStr()
Description 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: haystack = "hello", needle = "ll" Output: 2 ...原创 2019-01-06 11:52:43 · 126 阅读 · 1 评论 -
LeetCode | 9. Palindrome Number
Description Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Example 1: Input: 121 Output: true Example 2: Input: -121 Output: fals...原创 2019-01-01 17:42:47 · 157 阅读 · 0 评论 -
LeetCode | 27. Remove Element
Description Given an array nums and a value val, remove all instances of that value in-place and return the new length. Do not allocate extra space for another array, you must do this by modifying the...原创 2019-01-05 19:22:53 · 84 阅读 · 0 评论 -
LeetCode | 26. Remove Duplicates from Sorted Array
Description Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length. Do not allocate extra space for another array, you must do this...原创 2019-01-05 18:58:36 · 133 阅读 · 0 评论 -
LeetCode | 21. Merge Two Sorted Lists
Description 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. Example: Input: 1->2->4, 1->3->4 O...原创 2019-01-05 17:16:32 · 82 阅读 · 0 评论 -
LeetCode | 7. Reverse Integer
Description Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 321 Example 2: Input: -123 Output: -321 Example 3: Input: 120 Output: 21 Note: Assume we are d...原创 2019-01-01 11:11:19 · 95 阅读 · 0 评论 -
LeetCode | 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 order. You may assume no duplicates in the array. Ex...原创 2019-01-07 10:01:40 · 113 阅读 · 1 评论