5. after we iterate over all indices in the array, pop out stack repeatedly. each time we perform a pop operation, denote the popped out value by j, we know that all bars from stack top+1 to end of array inclusively is greater or each to hj. compute (array.length-stack.top-1)*hj...