Even though While having a full time job, you are so consistent. Just imagine how much discipline and consistent this guy would have when he was an UG student.🗿
oh man! was waiting for this from morning! tried understanding several approaches using binary search but none of the solutions in the discuss section were good. 🫤 also please share the segment tree code for bottom up please 🙏
There are 2 parts where you can utilize segment trees here - 1. Finding out L and R for the top down solution. 2. Finding out range max in range L to R in the bottom up solution. Did you understand these 2 parts atleast?
Even though While having a full time job, you are so consistent. Just imagine how much discipline and consistent this guy would have when he was an UG student.🗿
Excellent explanation!!🦸
Thanks for such video. Learned many things from this video
Sir why we are not iteratiing from P--0 in parts in iterative?Can we iterate that way?
nice explanation
oh man! was waiting for this from morning! tried understanding several approaches using binary search but none of the solutions in the discuss section were good. 🫤
also please share the segment tree code for bottom up please 🙏
I would encourage you to try that first and if you face issues, I can help further.
@@codingmohan i tried for past two days, but couldn't figure out! please tell the approach of applying segment trees to this problem!
There are 2 parts where you can utilize segment trees here -
1. Finding out L and R for the top down solution.
2. Finding out range max in range L to R in the bottom up solution.
Did you understand these 2 parts atleast?