Problem link: https://www.codechef.com/COLE2020/pro...
Official editorial: https://discuss.codechef.com/t/clbrkt...
0:09 Problem
0:13 Visual explanation of the problem
2:20 Brute force approach
3:38 Optimised approach
8:15 Running example
This a problem from the rated contest "Coder's legacy" conducted on Codechef. A problem based on stacks and some pre-computation.
If you liked the video, please consider pressing the like button and subscribing to the channel.