- 博客(14)
- 收藏
- 关注
原创 leetcode 410.Split Array Largest Sum(Hard)
Problem:Given an array which consists of non-negative integers and an integer m, you can split the array into m non-empty continuous subarrays. Write an algorithm to minimize the largest sum amo
2017-01-16 23:02:06 378
原创 Leetcode. 135 Candy(Hard)
**Problem**There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected to the following requirements:1.Each child mus
2016-11-26 23:32:03 369
原创 Leetcode 65. Valid Number(Hard)
Problem :Validate if a given string is numeric.Example: “0” => true ” 0.1 ” => true “abc” => false “1 a” => false “2e10” => trueAlgorithm:本题意为判断给定字符串是不是为合法的数字形式。本题的主要难点在于逻辑,需要不遗漏任何一种情况。因为只需要遍历一遍字符串
2016-10-13 17:43:56 334
原创 Leetcode 56. Merge Intervals && 57. Insert Interval(Hard)
56. Merge IntervalsProblem :Given a collection of intervals, merge all overlapping intervals.Example: Given [1,3],[2,6],[8,10],[15,18], return [1,6],[8,10],[15,18].Algorithm: 本题为一个合并区间的题目,即给定
2016-10-12 17:11:14 324
原创 leetcode 124. Binary Tree Maximum Path Sum(Hard)
Problem : Given a binary tree, find the maximum path sum.For this problem, a path is defined as any sequence of nodes from some starting node to any node in the tree along the parent-child connection
2016-10-07 21:40:49 227
原创 leetcode 84.Largest Rectangle in Histogram, 85.Maximal Rectangle
leetcode 84.Largest Rectangle in Histogram(Hard)leetcode 85.Maximal Rectangle(Hard)
2016-09-09 12:52:49 323
原创 leetcode 4. Median of Two Sorted Arrays(Hard)
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)).
2016-09-08 00:50:00 225
原创 Find the Difference —— leetcode
Given two strings s and t which consist of only lowercase letters.String t is generated by random shuffling string s and then add one more letter at a random position.Find the letter that was
2016-09-04 20:32:13 211
原创 ZigZag Conversion —— leetcode
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P A H NA P L S I
2016-09-04 19:08:27 201
原创 Two Sum —— leetcode
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 have exactly one solution.Example:Given nums
2016-09-04 18:51:24 196
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人