- Видео 75
- Просмотров 63 877
Alex does LeetCode
США
Добавлен 19 авг 2023
Hi! I'm an ex-Googler and a CS lecturer who teaches programming problems on stream. Come code along with me every Saturday at LeetCode's programming contests!
Видео
LeetCode Problem 506 (EASY): Relative Ranks
Просмотров 7455 месяцев назад
LeetCode Problem 506 (EASY): Relative Ranks
Let's Solve LeetCode 2444: Count Subarrays with Fixed Bounds
Просмотров 1857 месяцев назад
Let's Solve LeetCode 2444: Count Subarrays with Fixed Bounds
LeetCode Weekly Contest 390 Q4: Longest Common Suffix Queries (HARD)
Просмотров 3057 месяцев назад
LeetCode Weekly Contest 390 Q4: Longest Common Suffix Queries (HARD)
LeetCode Problem 452: Minimum Number of Arrows to Burst Balloons
Просмотров 4308 месяцев назад
LeetCode Problem 452: Minimum Number of Arrows to Burst Balloons
LeetCode Daily: Find Bottom Left Tree Value
Просмотров 1358 месяцев назад
LeetCode Daily: Find Bottom Left Tree Value
LeetCode Daily Contest: Minimum Common Value
Просмотров 2238 месяцев назад
LeetCode Daily Contest: Minimum Common Value
LeetCode Daily Problem: Middle of the Linked List
Просмотров 1118 месяцев назад
LeetCode Daily Problem: Middle of the Linked List
Learn the SLIDING WINDOW for Python in "Minimum Window Substring" #leetcodedailychallenge
Просмотров 669 месяцев назад
Learn the SLIDING WINDOW for Python in "Minimum Window Substring" #leetcodedailychallenge
Very HARD LeetCode problem (11% accept rate) from Contest 122
Просмотров 67510 месяцев назад
Very HARD LeetCode problem (11% accept rate) from Contest 122
Keep it up brother
Thanks so much, really appreciate it!
For second problem, we really dont need prefix sum. Max it will take 26 iterations to convert any character to another.
Really Nice👍
Thank you, friend
Keep it up Brother👍
Thank you, friend!
Good job Alex, keep it up! 👍🏻
Thanks Saurabh! Appreciate your kind words and your coming back each week!
Ahhh! I always miss the easy contests, solved all 4 this time in virtual! First time I've used quadratic formula in leetcode haha! (For Q2 I did binary search + quadratic formula)
Very nice! Good job solving all four questions. Yeah the weekly contest time is not ideal for a lot of folks. As usual, appreciate you supporting the channel, RF!
Can you solve these in c++ in the upcoming videos as im new to coding and just started leetcode in c++ and most of us voted for c++ in the community post too
Hmm, I'll try to release some videos in C++. I haven't done C++ in years, and I'll definitely struggle in the contests. I'll practice two weeks and maybe I'll do C++ for Sept 14!
Hey Alex please continue these type of series. It helps to clear the concepts and upsolving speed. Keep up the good work !
Thank you subhajitdey135! I appreciate your kind words and I usually stream every weekend. Happy to help!
yesterday was my first contest and i was able to solve only first question and now watching your explain,,, keep doing streaming sir, after the contest..(Red Heart with smiley face)
Thank you for your encouragement! Keep on working at it -- getting just one question is a good step forward. Hope you come back next week and get two questions!
Did q1 and q2 in 10 mins but q3 was too tough for me and q4 i was able to solve about 70%
Yeah, Q3 is much harder than Q4 this week. I did Q4 first cos I couldn't do Q3, so the contest time is better. Let's hope next week is better for both of us, ITACHI!
I was able to solve 1,2, and 4. Q3 is hard, but I *think* I was pretty close.
In case anyone is looking for it like I was... there is no solution in this video for question 3 or 4.
Yes, unfortunately I wasn't able to do those questions either. I was certain Q3 was Heap, but there was another trick for dealing with large exponents which I didn't get either. I'll try to solve them later today and release a separate video if I succeed!
@@alex.does.leetcode Looking forward to it! I didn't get #3 or #4 either. I assumed that the heap would be enough for #3, but it wasn't. Looking at some of the other code, it looks like it takes rewriting the pow function to make it more efficient using some fancy bit manipulation that I don't fully understand.
Solved only 1st ques... TLE in 2nd and 3rd 🥰
This was a REALLY hard contest, ITACH1! But just by showing up and trying (and learning) you are already winning.
How did you identify q3 as dp qstn..i stuck there
Fantastic question! Your best clue is when there is some long structure of size n (either an actual data structure like a list, or just some kind of sequence of numbers), and: a) It's easy to solve when n = 1, b) It's easy to solve n=i when n=i-1 is known. In Q3, we can solve this easily when nums is of length (n=1). To solve n=2, we group all the monotonic pairs of length 1 by their last arr1 value, then use that count how many new pairs of length 2 can be created. And so on for n=3, etc ... This suggests that you can use a DP approach. Hope this helps!
Bro can u also provide solutions in java
Thanks for the feedback! I'll try to add to Github, though it's unlikely I will do the contest in Java.
why no live man?
What is the meaning of at most k indices i in range [0, SEQ.LENGTH - 2]. Does it means that given k will only have value till (n - 2) where n is length of sequence ?
Good attention to detail! Yes it means the index (which is i, not k) only goes up to n-2. Why? Think about the condition "seq[i]!=seq[i+1]". It compares each number at i to the "next number" at (i+1). What is the last value of i you need to check? The second last i at (n-2) will compare itself to the last i at (n-1), and you are done. In fact, index (n-1) has no "next number" to compare to.
You can write it out on paper: when n is 10, i goes from 0 to 9. Which is the last pair you check for "seq[i]!=seq[i+1]"? That's right, it's index 8 and 9, which makes the last i = 8 (aka n-2)
Hey great
Good explanation ❤️
Thanks Satyam! Appreciate your kind words and continued support!
So please can we connect ❤
Hi Vaibhav, unfortunately I don't do LinkedIn or anything else, but feel free to connect via comments or come by my livestreams if you want to ask questions or chat!
Okay sir thank ❤@@alex.does.leetcode
If you are reading this
Hello
NICE SUPER EXCELLENT MOTIVATED
Thanks for your kind words, Ganesh! Appreciate it
Great work mannn... Been learning a lot more from you
Thanks, A_Myth963! Appreciate your kind words!
how bisect function works??
Great question! Bisect is Python's binary search module. I have a short: ruclips.net/user/shortsXUyAgYQPZYM You can also learn more about it at www.geeksforgeeks.org/bisect-algorithm-functions-in-python/
u are doing great work man keep uploading
Thanks man! Glad the stream is helpful to people
@@alex.does.leetcode Yupp... i was stuck on problem 3 nd 4 this is my first contest...
May the force be with you! 🎉
You too, RedFinance. See you next weekend!
Excellent explanation ❤
55:00
Thanks it's amazing ❤
Thank you for your kind words! I'm glad the explanations were helpful to you
@@alex.does.leetcode it was the greatest explanation by you but can we connect please 🙏
@@VaibhavSingh_code Thank you! Though unfortunately right now I don't give out my LinkedIn.
@@alex.does.leetcode okk
@@alex.does.leetcode then tell me I am in 3rd year engineering I want opportunities please help me
What's ur age?
hey great video, please create playlist for beginners
Will do! Some of my beginner problems are a bit older though.
Amazing explainations brother!!! If possible can you please provide the codes in c++, it will be more helpful for us.
Hi, I can add C++ solutions to Github, though I will likely still do my explanations using Python. Will that help? Really appreciate your feedback either way. I've found it a bit easier to teach in Python since there is less boilerplating, but I do realize many students learn C++ or Java.
@@alex.does.leetcode It will surely help if you only provide the codes. In india, most of the people use C++ or Java for learning DSA. So, it will help you to reach to large audience.
@@study-yd6es Thanks! I didn't know that about India before!
Love the video, thank you
Thanks for your encouragement, Srivatsan!
Use timestamp in the video description to jump to the discussion questions!
Full video here: ruclips.net/video/H_H5m-sO_Gw/видео.html Like and Subscribe for more programming tips and LeetCode content!
Nice. How did you animate this?
@@userhandle-l I used VSDC. It's free and good for video processing
Loved the livestream, especially since your explanation for Q3 was very easy to follow. I would prefer more contest based content but really there is a lot to learn from the varied problems on the site, so anything leetcode related can most certainly be good! 😃
Thanks for your kind words and see you next week!
Apologies, this stream is scuffed because I had Internet problems. I will upload a separate video just on Q4 later this week!
Done with 100% beat rate 🤭
the visualization and code was perfect amazing work
Thank you! I'm really encouraged to hear you say that
thank you so much 👍
You are welcome!
Cool livestream! Unfortunately due to the time of leetcode weekly contests I cannot participate in them but I always try to do the biweekly ones!
Thanks and no worries! Loved having you in the chat, you're doing really well for your age -- I hope you can find opportunities for internships and strong universities to apply to.
Solution discussions start from 01:32:52
YT doesn't allow me to edit this video so I couldn't cut the contest time. Use the bookmarks to jump ahead to the question you want! (Cut version of this video at ruclips.net/video/OwpEUwBPGlM/видео.html)
I'm going to trim the video to just the discussion once RUclips finished loading this video. Bear with me a few minutes!
Awesome to have the chance to observe the thought process
Thanks for your kind comment. I'm glad this video was helpful to you!
can i get your email id , to get referral in your company so that i can send my resume to u ?
Thank you for giving me a view of what goes on inside the heads of programmers. I will learn someday, slowly but surely.
I hope you do! I've been a programmer for 15 years and I still love it. I know you will find your passion for the craft some day!
Bro just record the screencast and post it after the contest lol. There's point in having a video of 1:50 hrs and actual content being at last 15 mins.
Thanks for the feedback! RUclips weirds out the stats if I alter the livestream vod in any way. I've shortened the stream vod, hopefully this makes it easier to watch.
more videos pleas
I've been out sick, but new videos are coming! I have the solution for last week's Biweekly Contest out tomorrow, and I'll be in Contest #382 on Sunday. Hope to see you in the live stream.