Problem 2970 · Easy
Use the increasing prefix and suffix with two pointers to count removable subarrays in linear time.
Open the interactive visualisation