802. Find Eventual Safe States
21:17
Пікірлер
@iamnoob7593
@iamnoob7593 18 күн бұрын
Need to improve on explanation , Could not understand.
@rifat8940
@rifat8940 Ай бұрын
class Solution { public: bool checkInclusion(string s1, string s2) { string x = s1; reverse(x.begin(), x.end()); if (s2.find(s1) != string::npos || s2.find(x) != string :: npos) return true; else return false; } }; wrong ans at testcase 80, what's the reason ?
@rifat8940
@rifat8940 Ай бұрын
This is optimize, thanks guru
@vipinpandey3779
@vipinpandey3779 2 ай бұрын
Bro Use ENC headphone like jlab and jebra
@henryliu5671
@henryliu5671 2 ай бұрын
best expanation
@anukulsahu
@anukulsahu 3 ай бұрын
optimal ka matlab kuch v samjha dete ho, alluwa understanding video h
@madhu_mohanreddy
@madhu_mohanreddy 3 ай бұрын
thanks bro
@schan263
@schan263 3 ай бұрын
I am glad that I discovered your channel today. Your explanation is so much better than the leetcode editorial. Your video is very concise. I hit the "Subscribe" button.
@schan263
@schan263 3 ай бұрын
I discovered your channel today and this is the second video I watched. Thank you for making this awesome video. I only solved it with O(n) space complexity in the past. Now I know the O(1) space complexity solution.
@VoltVipin_VS
@VoltVipin_VS 4 ай бұрын
For those who didn't understand the intuition behind this solution. Imagine 2 supports s1 and s2. s1 starts from 0 and s2 starts from sum of array. Now each rod will have 3 choice 1. Add to S1 2. Add to S2 3. Remove from S2. Notice the third choice is removing from s2 not adding into Null Set. So comparing with the solution provided in the video. op1 is Choice 1 op2 is Choice 3 op3 is Choice 2, as rod is already added into s2 thats why no change. In recursive solution op3 is Choice of adding rod into a null set. which is different in memoized answer.
@relaxingnaturalvibrations1171
@relaxingnaturalvibrations1171 4 ай бұрын
How it will pass all the test cases ?. It will give tle for sure. You are traversing some tree in every dfs call and you are saying it is o(n)?
@TejasviPatoliya-rm7qv
@TejasviPatoliya-rm7qv 5 ай бұрын
hello 10:48 video me aapne run kiya vo kese kiya?
@shreyansharya6125
@shreyansharya6125 5 ай бұрын
Nice Explanation !
@atharvasuryawanshi7675
@atharvasuryawanshi7675 5 ай бұрын
I think question is fairly simple, language is also easy to understand
@vinamrasangal8436
@vinamrasangal8436 5 ай бұрын
GIVING TLE
@luis_escobar..
@luis_escobar.. 5 ай бұрын
Sometime it cant able to solve palindrome questions
@lakshsinghania
@lakshsinghania 6 ай бұрын
@15:59 how can the min heap have <7,2> it should be <1,9> right ? we first popped <1,2> and then inserted {i,j+1} thats <1,9> and its lesser than <7,2> someone pls make me understand
@shahainmanujith2109
@shahainmanujith2109 6 ай бұрын
Very good explanation :)
@Soundar-su5ju
@Soundar-su5ju 6 ай бұрын
Nice explanation
@codelasagna875
@codelasagna875 6 ай бұрын
How to install axioms?
@starboy-lc9mp
@starboy-lc9mp 6 ай бұрын
great explanatiob bro
@anandoganiya9070
@anandoganiya9070 7 ай бұрын
Bro can you provide the brute force solution for this in java if possible or c++ will be fine
@ZohaibKhan-vj3tg
@ZohaibKhan-vj3tg 8 ай бұрын
good explanation
@NursultanBegaliev
@NursultanBegaliev 8 ай бұрын
Thank you! Great explanation
@trilochankankatala1687
@trilochankankatala1687 8 ай бұрын
I didn’t find anywhere this way solution. Thank you so much
@vikassinghbisht7305
@vikassinghbisht7305 8 ай бұрын
this is O(nlogn) solution but we can do this with o(n) time complexity
@rrr9848
@rrr9848 8 ай бұрын
Thank you sir 🎉
@iamnoob7593
@iamnoob7593 8 ай бұрын
Brilliant explanation
@mohit-x3t
@mohit-x3t 8 ай бұрын
Hello can you create a video on how to connect the node application with
@apputadhiyal9451
@apputadhiyal9451 9 ай бұрын
Thanks for the video , nicely explained.
@Believeharsh
@Believeharsh 9 ай бұрын
I really appreciate the hard work you have put into this video. Thanks for making this video.
@codelasagna875
@codelasagna875 6 ай бұрын
How to create the link for api, like he used london and generated the API key
@cricketsureshlucky
@cricketsureshlucky 9 ай бұрын
it really helped a lot thankyou😊😊
@sarvagyasingh924
@sarvagyasingh924 9 ай бұрын
will this work on negative numbers ?
@pushpalatha16
@pushpalatha16 10 ай бұрын
The explanation was easy to understand, thanks
@suneethasuresh9826
@suneethasuresh9826 10 ай бұрын
while swapping, why do we take (2*min) ?
@saaishashankkrishnakumar345
@saaishashankkrishnakumar345 10 ай бұрын
simple and neat solution bro
@rohanthakur9159
@rohanthakur9159 10 ай бұрын
The explanation was really awesome. Thanks a lot❤❤❤
@Shiwangi-singh
@Shiwangi-singh 11 ай бұрын
volume is very low
@vasumahalingam5162
@vasumahalingam5162 11 ай бұрын
Liked the solution. I made a small improvement with memoization. class Solution: def __init__(self): self.memo = {} def minOperations(self, n: int) -> int: if n in self.memo: return self.memo[n] v = int(math.log(n, 2)) if n == pow(2, v): return 1 low = pow(2, v) high = pow(2, v+1) d1 = n - low d2 = high - n self.memo[n] = 1 + min(self.minOperations(d1) , self.minOperations(d2)) return self.memo[n]
@pixelsbyme
@pixelsbyme 11 ай бұрын
hy your approach is very efficient. But I did not understood the intuition of summing up ALL elements of a diagonal rather than only 2 for each corresponding element of a matrix. Like in the intuition, you explained if both (right and bottom element) sum is greater than 1, then there surely exists a path to dest even after flipping. But whats the logic with summing up ALL diagonal elements?
@user-le6ts6ci7h
@user-le6ts6ci7h 11 ай бұрын
The apprpach 1 won't work, it depends on the order in which you remove the edge
@cse100amisha6
@cse100amisha6 11 ай бұрын
Bhaiya can you please suggest me some platform where i can practice question asked in OA
@VishalYadav-gk1kg
@VishalYadav-gk1kg 11 ай бұрын
Thank you sir, Very nice explanation!
@md.marufurrahmanremon3095
@md.marufurrahmanremon3095 11 ай бұрын
Could you please explain why you took ans as long?
@xtraglitch
@xtraglitch Жыл бұрын
best explanation thanks ! : )
@princekhunt13579
@princekhunt13579 Жыл бұрын
Nice explanation
@HimanshuDagar-kr7ct
@HimanshuDagar-kr7ct Жыл бұрын
What a technique! Just Awesome!
@PedroFerreira-kz6mq
@PedroFerreira-kz6mq Жыл бұрын
So good solution my friend
@schrodingerskatt222
@schrodingerskatt222 Жыл бұрын
I really didn't understood anything
@prajitbanerjee8226
@prajitbanerjee8226 Жыл бұрын
nice bro!!