I have been solving a problem and have been stuck on for a long time now :
Problem Statement :
We have to solve multiple queries for this problem.