Was able to solved using bruteforce approach but got TLE :( Though got intuition of solving using prefixSum but could'nt Thank you for your explanation sir :)
@techdose4u2 күн бұрын
Nice work!
@priyamani43492 күн бұрын
Thank you so much for this video
@techdose4u2 күн бұрын
welcome :)
@liveurlife31662 күн бұрын
Completed Sir.
@techdose4u2 күн бұрын
Great! 👍
@jayantpradhan-sz9oj3 күн бұрын
please DRY run in java code also , its humble request
@keerthivasan1383 күн бұрын
In java i got error due to int conversion it fgot solved using long to sum and prefix sum but involves alot of trials and error!
@jayantpradhan-sz9oj3 күн бұрын
@@keerthivasan138 copy your code then paste to chatgpt then him where is error and explain how .
@anirudhsingla83443 күн бұрын
@@keerthivasan138 yes same for me. getting one last test case failed due to this. but after using long its fixed.
@jayantpradhan-sz9oj2 күн бұрын
@@keerthivasan138 can i get your code ? or share me you leetcode profile link
@ashwinchakote39542 күн бұрын
Sir One small Doubt wouldn't Prefix array take space? So,Space Complexity is O(N)
@techdose4u2 күн бұрын
I dint take prefix array. Just a sum variable :)
@DineshKumar.R-uo1rt2 күн бұрын
Bro can you explain the problem 2080. Range Frequency Queries using segment tree in leetcode. I tried but can't solve the problem using segment tree.
@techdose4u2 күн бұрын
Recently solved a segment tree RMQ + Binary search. Frequency count is similar to RMQ. Please use that video. Goto the channel page and scroll past 15 videos you will see on thumbnail :)
@snehadey8832 күн бұрын
I wrote the same code but it beats only 64%, why?
@liveurlife31662 күн бұрын
dont focus on the beats on leetcode as it differs based upon the engine. You can verify this by submitting the same code different times but you get different beats