当前位置:网站首页>leetcode:85. 最大矩形
leetcode:85. 最大矩形
2022-06-24 06:32:00 【OceanStar的学习笔记】
题目来源
题目描述


题目解析
有矩阵如下:
准备一个直方图数组
- 子矩阵必须以第0行作为地基的情况下(往上看),哪个子矩阵含有的1最多
- 得到[1、1、1、1、1],然后我们得到maxArea=1+1+1+1+1=5
- 子矩阵必须以第1行作为地基的情况下(往上看),哪个子矩阵含有的1最多
- 得到[2、0、2、2、2],然后我们得到maxArea=2+2+2=6
- 子矩阵必须以第2行作为地基的情况下(往上看),哪个子矩阵含有的1最多
- 得到[3、1、3、0、3],然后我们得到maxArea=1+1+1=3
- 子矩阵必须以第3行作为地基的情况下(往上看),哪个子矩阵含有的1最多
- 得到[4、2、4、1、4],然后我们得到maxArea=2+2+2=6
求得maxArea可以参考leetcode:84. 柱状图中最大的矩形
边栏推荐
- Coding platform project construction guide
- Introduction to QWidget attribute table in QT Designer
- Royal treasure: an analysis of SQL algebra optimization
- How accurate are the two common methods of domain name IP query
- Just now, we received a letter of thanks from Bohai University.
- Koa source code analysis
- Produce kubeconfig with permission control
- Replacing human eyes -- visual inspection technology
- Domain name, resolution, SSL certificate product selection
- You don't have to spend a penny to build a wechat official website in a minute
猜你喜欢

创客教育给教师发展带来的挑战

Manual for automatic testing and learning of anti stepping pits, one for each tester
Oracle case: ohasd crash on AIX

【二叉数学习】—— 树的介绍

Technology is a double-edged sword, which needs to be well kept

The product layout is strengthened, the transformation of digital intelligence is accelerated, and FAW Toyota has hit 2022million annual sales

基于三维GIS系统的智慧水库管理应用

Enter the software test pit!!! Software testing tools commonly used by software testers software recommendations
![[fault announcement] one stored procedure brings down the entire database](/img/7c/e5adda73a077fe4b8f04b59d1e0e1e.jpg)
[fault announcement] one stored procedure brings down the entire database

【二叉树】——二叉树中序遍历
随机推荐
Wordpress5.8 is coming, and the updated website is faster!
Record of waic 2021 round table conference 𞓜 cross border dialogue: current situation and future of AI and sustainable development
What is a secondary domain name primary domain name how to apply for a secondary domain name
Go current limiting component package rate source code analysis
Easynvr is optimized when a large number of videos are not online or unstable due to streaming failure
Talk about the story behind search engines
Easy car Interviewer: talk about MySQL memory structure, index, cluster and underlying principle!
I want to say "three no" to digital transformation
The difference between ArrayList and LinkedList and the principle of using scene locality
Free and easy-to-use screen recording and video cutting tool sharing
Differences between JSON objects and JSON strings
Nature Neuroscience: challenges and future directions of functional brain tissue characterization
Apache enables gzip compressed web page transmission method
How accurate are the two common methods of domain name IP query
Wireshark grabs the RTSP stream of easynvr without displaying RTSP. Solution
How fast? Good province!
Discussion on NFT Technology
When the VPC main network card has multiple intranet IP addresses, the server cannot access the network internally, but the server can be accessed externally. How to solve this problem
Use of SAP QM inspection points
Water conservancy RTU telemetry terminal