https://codeanddebug.in/blog/sum-of-subarray-minimums/