⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠ You can decompress Drawing data with the command palette: ‘Decompress current Excalidraw file’. For more info check in plugin settings under ‘Saving’

Excalidraw Data

Text Elements

height = [1,7,2,5,4,7,3,6]

width (r - l)

  • calculate the min height between l and r

  • and multiply by the width to get the area

  • update our result variable if and only if the new result is greater than the current

  • to achieve different results we see if left is less than or equal to right then we move it

  • otherwise right is so we move it by one too

  • this continues until left crosses right

  • start at the left and right