it may have been easier to understand by keeping the/one example
@letscode10005 күн бұрын
yes, it makes sense to keep consistant with examples, I'll keep in mind.
@shashwatbhatnagar6595 күн бұрын
Great explanation. Thank you so much. Keep this great work up !! 🥰
@letscode10005 күн бұрын
thanks😃
@basic-2-advance6 күн бұрын
Keep up the good work!
@sallaklamhayyen98768 күн бұрын
good explanation = thank you so much + please continue❤❤
@letscode10008 күн бұрын
thanks, every time when I start to give up and received the message that cheer me up to continue.❤
@Dagemawi-j7i18 күн бұрын
Thanks a lot this was helpful👍👍
@cidu170621 күн бұрын
给我讲懂了,太强了
@letscode100022 күн бұрын
What is your intution when you come across this problem?
@problemsolvers708525 күн бұрын
Hi, I love your content! 🎥 I specialize in video editing and thumbnail design, and I’d love to help enhance your videos and boost your channel's visuals. If you’re interested, let’s chat about how I can contribute to your amazing work!
@letscode100024 күн бұрын
thanks a lot, I still need more time to focus on how to improve my English skills and algorithms skills. Boosting the channel is not my target currently.
@problemsolvers708524 күн бұрын
@@letscode1000 Thank you for your time and consideration. I completely understand and appreciate your response. If you ever have a need for video editing or thumbnail design services in the future, please don’t hesitate to reach out. Wishing you continued success with your channel! Best regards,
@karvinusАй бұрын
very easy and intuitive solution
@letscode100027 күн бұрын
thanks mate
@ronaldjohnson_itaАй бұрын
Thanks!
@letscode100027 күн бұрын
No problem!
@Anonymous____________A721Ай бұрын
Nice reading comprehension
@letscode100027 күн бұрын
Thank you!
@Anonymous____________A72127 күн бұрын
@@letscode1000 😑😑
@aqhr050Ай бұрын
Thanks for the solution, this would be very hard without sortedlist.
@letscode100027 күн бұрын
definitely
@rajushankpoul9928Ай бұрын
Hey buddy I have no idea about this but Im still watching..!
@letscode1000Ай бұрын
I know it seems hard when you first come across linked list, but it will be much easier when you’re getting familiar with basic data structure like tree and graph, linked list is basic disconnect and connected 2 nodes, from beginning you can practice with making a drawing, after that,everything is in your mind, you know how to do it.
@rajushankpoul9928Ай бұрын
@@letscode1000 Everything in my mind, So how can I access my brain info..!
@rajushankpoul9928Ай бұрын
If everything in my mind, so how can I access my brain info.. !
@letscode1000Ай бұрын
@@rajushankpoul9928 this is not the kind of hard problems need to use brain, only some harder problems need to use brain, use your mind is like memory and experience.
@rajushankpoul9928Ай бұрын
@@letscode1000 hey buddy how can I send video to better understanding for me..!
@HarisVFXАй бұрын
This was helpful thanks!
@letscode100027 күн бұрын
thanks
@unanimous8510Ай бұрын
why do you draw that grid's border as a semi-circle? that should be a straight line god damn it!
@letscode1000Ай бұрын
this is a 4 color problem
@madhuvamsimachavarapu5267Ай бұрын
class Solution: def findTheDistanceValue(self, arr1: List[int], arr2: List[int], d: int) -> int: myset = set(arr2) count = 0 def process(i,d): ans = [i] while d>=0: ans.extend([i-d,i+d]) d-=1 return ans for i in arr1: acceptable_values=process(i,d) ll=list(filter(lambda x:x in myset,acceptable_values)) if len(ll)>=1: continue else: count+=1 return count
@МаркЛевичкинАй бұрын
Elegant
@letscode10002 ай бұрын
we can use return list(A.intersection(P)) to make it mush easier to write
@ceciljoel95772 ай бұрын
If someone is good at codeforces problems can they easily become good at leetcode problems
@PigCurious2 ай бұрын
Thanks for the video, helped me out. keep up the good work! 🌸
@letscode1000Ай бұрын
Thank you! Will do!
@supplymeweed2 ай бұрын
I have a doubt why we cannot make prefix sum of size same as nums size, why we initialize prefix sum 0 at 0 index
@letscode10002 ай бұрын
It's also ok without zero padding, we can prepare a padding 0 for easy handle edge cases, like prefix sum from index 2 - index 0, if no zero padding, you need to have the edge cases check and add more lines of code. if it has no index 0 padding, you need the if check to check if it is zero.
@supplymeweed2 ай бұрын
Thank you bro, this solution really helped me...
@yashwanthnadella5373 ай бұрын
Nice explanation!
@nikenuke3 ай бұрын
thank you!
@sherzodaxadov59393 ай бұрын
good idea bro thanks
@letscode1000Ай бұрын
No problem
@lnaffable3 ай бұрын
thanks broo
@Pavan_Guru_28034 ай бұрын
Nyc Explaination Bro
@letscode10004 ай бұрын
Thanks
@sallaklamhayyen98764 ай бұрын
good explanation = thank you so much❤❤❤ please keep doing this kind of videos , because are very helpful for us
@letscode10004 ай бұрын
thanks, I'll continue to improve the content and quality of the video.
@elliekong7124 ай бұрын
Thanks a lot!!!!! <3
@khushibhansali57864 ай бұрын
code does work when hamsters =".HH.H.H.H.."
@letscode10004 ай бұрын
tested, works class Solution: def minimumBuckets(self, hamsters: str) -> int: n = len(hamsters) i, res = 0, 0 while i < n: if hamsters[i] == 'H': if i + 1 < n and hamsters[i + 1] == '.': i += 2 res += 1 elif i - 1 >= 0 and hamsters[i - 1] == '.': res += 1 else: return -1 i += 1 return res
@phillipduffy94894 ай бұрын
promo sm
@JinhuaXiong5 ай бұрын
Thank you so much for the video! It really helped me learn sliding window, such a smart way to solve it, the logic behind it is quite tricky though.
@ramrockzz87735 ай бұрын
Nice Explanation
@riddle-me-ruben5 ай бұрын
Great solution and easy to understand thanks for the whiteboard explanation.
@letscode10004 ай бұрын
Glad it was helpful!
@hardiklimbachiya90465 ай бұрын
So far. easiest explanation found on youtube ..Thanks !
@xBlackMambaWT5 ай бұрын
great solution and explanation!
@letscode10005 ай бұрын
Glad it helped!
@whatshouldbethename45226 ай бұрын
Can we use vanilla dijkstra instead?
@letscode10005 ай бұрын
yes, we can.
@sayeedchowdhury116 ай бұрын
Thanks, good explanation
@letscode10004 ай бұрын
Glad it was helpful!
@ЕвгенийПросвирнин-и4б6 ай бұрын
it is not binary search solution((
@letscode10004 ай бұрын
hmm, maybe recursive or quick power is a good name
@tarushiarora86286 ай бұрын
Explained it in precise and concise manner ..amazing
@dhmkkk6 ай бұрын
your channel is a goldmine got my weekends covered now🙏
@letscode10006 ай бұрын
Thanks, I’ll continued the improvement, practice makes perfect!
@Anurag-gi2li6 ай бұрын
Thanks
@letscode10006 ай бұрын
The time complexity is O(n^4), sorry for that I didn't solve it online, after carefully checking, it should be this: we have s1, s2 with cache, it's n^2, we have for loop, it's now n^3, but we also have s1 == s2, it's another O(n), so the time complexity is O(n^4), if you have any questions, please make a comment.
@rajan-u6b7 ай бұрын
awesome bro.....thankx
@letscode10007 ай бұрын
time is O(m + n)
@letscode10007 ай бұрын
Time is O(n^2), there is for loop inside.
@vinayakbajpeyi9317 ай бұрын
Cool video, thanks!
@letscode10004 ай бұрын
Glad you liked it!
@szain987 ай бұрын
I think they have added new test cases to this problem, this solution gives TLE now. But my intuition is that you can actually abstract the inner for-loop into its own method (example: def parseSubstring(...){}. If the for-loop in this new method is somehow transformed into a recursive call, then you can add @cache decorator above the new parseSubstring(...) method signature to memoize the results and prevent TLE. I'm too lazy to spend time implementing this though since I'd rather use my time to review other problems for my Amazon on-site lol.....
@letscode10007 ай бұрын
I've justed checked in .com and .cn, they're both ok in python. here is the code, you can have check. class Solution: def longestValidSubstring(self, word: str, forbidden: List[str]) -> int: forbidden = set(forbidden) # n * m ** 2 l, res = 0, 0 for r in range(len(word)): for i in range(r, max(r - 10, l - 1), -1): if word[i: r + 1] in forbidden: l = i + 1 break res = max(res, r - l + 1) return res
@szain987 ай бұрын
This really helped me understand this problem better, thanks