I’m solving typical coding problems you would be asked to solve during an interview. These puzzles are a lot of fun and there’s always something new to learn.
* Largest Rectangle in Histogram: 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.
* Trapping Rain Water: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.
Glitch project to visualize a histogram: https://histogram-from-array.glitch.me/
Source code on https://github.com/fhinkel/twitch. — Watch live at https://www.twitch.tv/fhinkel