https://github.com/raviseta/coderbyte-solution
Largest Rectangular Area in a Histogram
https://github.com/raviseta/coderbyte-solution
Last synced: 9 months ago
JSON representation
Largest Rectangular Area in a Histogram
- Host: GitHub
- URL: https://github.com/raviseta/coderbyte-solution
- Owner: raviseta
- Created: 2022-04-24T06:47:48.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-24T06:52:52.000Z (about 4 years ago)
- Last Synced: 2025-04-12T12:59:26.143Z (about 1 year ago)
- Language: Swift
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# coderbyte-solution
Largest Rectangular Area in a Histogram
Find the largest rectangular area possible in a given histogram where the largest rectangle can be made of a number of contiguous bars.
For simplicity, assume that all bars have same width and the width is 1 unit.
For example, consider the following histogram with 7 bars of heights {6, 2, 5, 4, 5, 1, 6}.
The largest possible rectangle possible is 12