To have the full interactive experience, please view this video on itempool:
https://itempool.com/NOC21CS99/c/gyYDC6nYQi9
This lecture is based on the Reversort problem (Google Code Jam 2021 Qualifiers, Problem A), and you can find a link to it here:
https://bit.ly/NPTEL-cs99-W01-Mod1-problem
This is a straightforward implementation problem.
The code discussed in the video can be found here:
https://bit.ly/NPTEL-cs99-W01-Mod1-solution-cpp
Timestamps:
3:46 Problem statement I: The reversort algorithm
6:10 Some examples
7:52 Problem statement II: Definition of cost of reversorting and the task
8:20 Solution: Computing the cost
9:06 More examples
12:25 Recap and Implementation