Problem
LeetCode 85. Maximal Rectangle
Difficulty : Hard
Given a 2D binary matrix filled with 0’s and 1’s, find the largest rectangle containing only 1’s and return its area.
Example :
1 | Input: |
LeetCode 85. Maximal Rectangle
Difficulty : Hard
Given a 2D binary matrix filled with 0’s and 1’s, find the largest rectangle containing only 1’s and return its area.
Example :
1 | Input: |
LeetCode 84. Largest Rectangle in Histogram
Difficulty : Hard
Given n non-negative integers representing the histogram’s bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.
Above is a histogram where width of each bar is 1, given height =[2,1,5,6,2,3]
.
The largest rectangle is shown in the shaded area, which has area =10
unit.
Difficulty : Hard
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:
- Each child must have at least one candy.
- Children with a higher rating get more candies than their neighbors.
What is the minimum candies you must give?
LeetCode 32. Longest Valid Parentheses
Difficulty : Hard
Given a string containing just the characters
'('
and')'
, find the length of the longest valid (well-formed) parentheses substring.
虽然已经用了大半年的 Go,但是这个学期有一门课程又要用到 Go,那么就再来从头开始学一次Golang
吧,安装运行一条龙。
LeetCode 23. Merge k Sorted Lists
Difficulty : Hard
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.