AlgoMaster Logo

Sum of Subarray Ranges

nums=[1, 2, 3]
0 / 11
algomaster.io
Step:Brute force: add (max - min) of every subarray to a running total.