can you give me a solution without using lazy propagation…normal soln
Query bit doubt
In a normal solution your solution will give a time limit exceeded. You must use segment tree for solving this problem. You can try submitting without lazy propogation in segment tree but I would recommend you to use lazy propogation whenever you code segment tree in any problem.
yes sure …please provide me the code using segment trees but not using lazy propagation
Are it’s your task to do it. If I would do everything for you how will you learn. And don’t be afraid of solving complex problems. Do these yourself.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.