Implement an O(n^2) solution for largest histogram problem in leetcode, too slow to pass the large data set.