- 博客(19)
- 收藏
- 关注
原创 leetcode(32). Longest Valid Parentheses
problem Given a string containing just the characters ‘(’ and ‘)’, find the length of the longest valid (well-formed) parentheses substring. For “(()”, the longest valid parentheses substring
2017-07-31 15:21:40 213
原创 leetcode(104). Maximum Depth of Binary Tree
problem Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.
2017-07-30 20:39:06 217
原创 leetcode(70). Climbing Stairs
problem You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top? Note: Given
2017-07-27 13:13:39 244
原创 leetcode(53). Maximum Subarray
problem Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [-2,1,-3,4,-1,2,1,-5,4], the contiguous subarr
2017-07-27 11:07:25 226
原创 leetcode(34). Search for a Range
problem Given an array of integers sorted in ascending order, find the starting and ending position of a given target value. Your algorithm’s runtime complexity must be in the order of O(log)
2017-07-26 21:29:56 299
原创 leetcode(33). Search in Rotated Sorted Array
problem Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).
2017-07-26 16:30:11 249
原创 leetcode(21). Merge Two Sorted Lists
problem 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.
2017-07-25 23:56:25 208
原创 leetcode(20). Valid Parentheses
problem Given a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[’ and ‘]’, determine if the input string is valid. The brackets must close in the correct order, “()” and “()[]{}”
2017-07-25 21:31:45 189
原创 leetcode(11) Letter Combinations of a Phone Number
problem Given a digit string, return all possible letter combinations that the number could represent.
2017-07-25 12:13:36 286
原创 leetcode(15). 3Sum
problem 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-07-23 23:36:35 225
原创 leetcode(11) Container With Most Water
problem Given n non-negative integers a1,a2,...,an,a_1, a_2, ..., a_n, where each represents a point at coordinate (i,ai)(i, a_i). n vertical lines are drawn such that the two endpoints of line
2017-07-22 12:09:18 212
原创 leetcode(5) Longest Palindromic Substring
problem Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.
2017-07-21 23:04:08 179
原创 leetcode(3) Longest Substring Without Repeating Characters
problem Given a string, find the length of the longest substring without repeating characters.
2017-07-21 17:16:14 220
原创 leetcode(4) Median of Two Sorted Arrays
problem 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)).
2017-07-20 15:07:42 185
原创 leetcode(628) Maximum Product of Three Numbers
problem Given an integer array, find three numbers whose product is maximum and output the maximum product.
2017-07-19 23:06:40 287
原创 leetcode(7) reverse integer
problem Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 Note: The input is assumed to be a 32-bit signed integer. Your function should return
2017-07-19 13:51:44 185
原创 leetcode(9) Palindrome Number
Problem Determine whether an integer is a palindrome. Do this without extra space.
2017-07-19 11:42:08 198
原创 leetcode(2)Add Two Numbers
Problem 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 and
2017-07-15 21:17:44 178
原创 leetcode(1) Two sum
Question Given an array of integers, return indices of the two numbers such that they add up to a specific target.
2017-07-15 15:37:42 288
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人