leetcode
文章平均质量分 65
jinjinjin2014
这个作者很懒,什么都没留下…
展开
-
【leetcode】1. Two Sum
一、题目描述https://leetcode.com/problems/two-sum/description/题目原文: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 wou...原创 2018-06-26 12:28:37 · 106 阅读 · 0 评论 -
【leetcode】26. Remove Duplicates from Sorted Array
一、题目描述(删除重复元素)https://leetcode.com/problems/remove-duplicates-from-sorted-array/description/给定排序的数组nums,就地删除重复项,使每个元素只出现一次并返回新的长度。不要为另一个数组分配额外的空间,必须通过使用O(1)额外内存修改输入数组来实现此目的。Example 1:Given nums = [1,1...原创 2018-07-06 21:26:34 · 137 阅读 · 0 评论 -
【leetcode】20. Valid Parentheses
一、题目描述(最长公共前缀)https://leetcode.com/problems/valid-parentheses/description/Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.An input...原创 2018-07-06 18:49:23 · 200 阅读 · 0 评论 -
【leetcode】14. Longest Common Prefix
一、题目描述(最长公共前缀)https://leetcode.com/problems/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...原创 2018-07-04 00:57:42 · 148 阅读 · 0 评论 -
【leetcode】13. Roman to Integer
一、题目描述(罗马数字转为数字)https://leetcode.com/problems/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 ...原创 2018-07-03 18:44:04 · 96 阅读 · 0 评论 -
【leetcode】9.Palindrome Number
一、题目描述https://leetcode.com/problems/palindrome-number/description/Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward.(确定整数是否是回文。 一个整数是一...原创 2018-07-03 16:35:29 · 120 阅读 · 0 评论 -
【leetcode】7. Reverse Integer
一、题目描述 https://leetcode.com/problems/reverse-integer/description/题目原文:Given a 32-bit signed integer, reverse digits of an integer.(给定一个32位有符号整数,求它的倒数。)Example 1:Input: 123 Output: 321 Example 2:Input...原创 2018-07-03 15:57:57 · 107 阅读 · 0 评论 -
【leetcode】53. Maximum Subarray(最大子串)
一、题目描述原文链接:https://leetcode.com/problems/maximum-subarray/description/Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return it...原创 2018-07-09 11:22:55 · 154 阅读 · 0 评论 -
【leetcode】27. Remove Element
一、题目描述(删除给定元素)https://leetcode.com/problems/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 ...原创 2018-07-06 21:49:42 · 103 阅读 · 0 评论