Databricks Interview Question

find maximal square from histogram.