leetcode
小-立子
菜鸟开始学编程
展开
-
LeetCode #9 Palindrome Number
Description Determine whether an integer is a palindrome. Do this without extra space.原创 2017-03-17 20:47:08 · 322 阅读 · 0 评论 -
LeetCode #20 Valid Parentheses
Description Given a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[’ and ‘]’, determine if the input string is valid.The brackets must close in the correct order, “()” and “()[]{}” are all原创 2017-07-02 22:23:21 · 325 阅读 · 0 评论 -
LeetCode #18 4Sum
Description Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target.原创 2017-05-07 14:44:14 · 301 阅读 · 0 评论 -
LeetCode #15 3Sum
Description Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.原创 2017-04-23 23:10:48 · 282 阅读 · 0 评论 -
LeetCode #17 Letter Combinations of a Phone Number
Description Given a digit string, return all possible letter combinations that the number could represent.原创 2017-05-14 21:16:07 · 243 阅读 · 0 评论 -
LeetCode #16 3Sum Closest
Description Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would ha原创 2017-05-01 15:31:06 · 300 阅读 · 0 评论 -
LeetCode #14 Longest Common Prefix
Description Write a function to find the longest common prefix string amongst an array of strings.原创 2017-04-15 14:59:44 · 315 阅读 · 0 评论 -
LeetCode #8 String to Integer (atoi)
Description Implement atoi to convert a string to an integer.原创 2017-03-17 00:38:05 · 251 阅读 · 0 评论 -
LeetCode #7 Reverse Integer
Description Reverse digits of an integer.原创 2017-03-17 00:32:11 · 298 阅读 · 0 评论 -
LeetCode #11 Container With Most Water
Description Given n non-negative integers a1, a2, …, an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). F原创 2017-03-26 23:36:23 · 359 阅读 · 0 评论 -
LeetCode #13 Roman to Integer
Description Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999.原创 2017-04-09 17:00:50 · 295 阅读 · 0 评论 -
LeetCode #12 Integer to Roman
Description Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. Note: You may not slant the container and n is at least 2.Analysis题目难度为:Medium原创 2017-04-09 16:57:23 · 274 阅读 · 0 评论 -
LeetCode #6 ZigZag Conversion
Description The string “PAYPALISHIRING” is written in a zigzag pattern on a given number of rows like this:原创 2017-03-12 20:12:33 · 303 阅读 · 0 评论 -
LeetCode #5 Longest Palindromic Substring
Description Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.ExampleInput: “babad”原创 2017-03-12 19:57:50 · 230 阅读 · 0 评论 -
LeetCode #10 Regular Expression Matching
Description Implement regular expression matching with support for ‘.’ and ‘*’.'.' Matches any single character.'*' Matches zero or more of the preceding element.The matching should cover the entire in原创 2017-03-19 22:33:40 · 388 阅读 · 0 评论 -
LeetCode #4 Median of Two Sorted Arrays
Description There are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).Examplenums1 = [1, 3原创 2017-03-06 12:30:26 · 285 阅读 · 0 评论 -
LeetCode #3 Longest Substring Without Repeating Characters
Description Given a string, find the length of the longest substring without repeating characters.ExampleGiven “abcabcbb”, the answer is “abc”, which the length is 3.Given “bbbbb”, the answer is “b”, wi原创 2017-02-25 15:16:51 · 255 阅读 · 0 评论 -
LeetCode #2 Add Two Numbers
Description You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers an原创 2017-02-25 15:07:36 · 295 阅读 · 0 评论 -
LeetCode #19 Remove Nth Node From End of List
Description Given a linked list, remove the nth node from the end of list and return its head.原创 2017-06-27 17:08:26 · 297 阅读 · 0 评论