Can we solve this with the segment tree to find the maximum element of the a range of i of and j . I have applied this approach is contest and it passed . Bhaiya please reply . 🤔🤔
Make sure to join Discord for active Discussions during & post contest - discord.gg/5y4XTfeb . . If we think closely this can also be solved by only Map & only Stack too, thus resulting in most optimal time complexity to be O(n).
Can we solve this with the segment tree to find the maximum element of the a range of i of and j . I have applied this approach is contest and it passed . Bhaiya please reply .
Can we solve this with the segment tree to find the maximum element of the a range of i of and j . I have applied this approach is contest and it passed . Bhaiya please reply . 🤔🤔
agar pass hogya toh kr hi skte hai
Very nice explanation, keep on making such videos.
Really helpful!!!
Thanks for the clear and concise explanation ❤
How does logic become so great so quickly ❤
Good explanation bro
Make sure to join Discord for active Discussions during & post contest - discord.gg/5y4XTfeb
.
.
If we think closely this can also be solved by only Map & only Stack too, thus resulting in most optimal time complexity to be O(n).
Can we solve this with the segment tree to find the maximum element of the a range of i of and j . I have applied this approach is contest and it passed . Bhaiya please reply .
@@abiraljain7313 Where did you learn segment tree from?
Today contest was very easy
you must have ranked in the top 100 then, stfu
bro i dont know why but i was thinking of Sliding Window + ProirityQueue+HashMap approach .does this will work ?.
I applied your approach, but it failed in some test cases, then I realised sliding window won't work
@@Groza558 ohh okay
yup i applied sliding window and only 550+ test cases passed from 800
It's TLE in Java 😢