- 1 164
- 156 818
Sleepy Cracker
Taiwan
Приєднався 17 кві 2021
#LeetCode 1356 | Sort Integers by The Number of 1 Bits #Java
Questions in English: docs.google.com/spreadsheets/d/1QNSEok-WD4LCPTrZlqq5VVTX0NbXQf27WUjkGi3aBu0/edit?usp=sharing
Questions in Mandarin: docs.google.com/spreadsheets/d/1aMCmSLucm7I_7BIRz1SqHy8c1D9h_6M8XAkrqWXSy8Y/edit?usp=sharing
Questions in Mandarin: docs.google.com/spreadsheets/d/1aMCmSLucm7I_7BIRz1SqHy8c1D9h_6M8XAkrqWXSy8Y/edit?usp=sharing
Переглядів: 5
Відео
#LeetCode 2859 | Sum of Values at Indices With K Set Bits #Java
Переглядів 17 годин тому
Questions in English: docs.google.com/spreadsheets/d/1QNSEok-WD4LCPTrZlqq5VVTX0NbXQf27WUjkGi3aBu0/edit?usp=sharing Questions in Mandarin: docs.google.com/spreadsheets/d/1aMCmSLucm7I_7BIRz1SqHy8c1D9h_6M8XAkrqWXSy8Y/edit?usp=sharing
#LeetCode 597 | Friend Requests I: Overall Acceptance Rate #SQL
Переглядів 9День тому
Questions in English: docs.google.com/spreadsheets/d/1QNSEok-WD4LCPTrZlqq5VVTX0NbXQf27WUjkGi3aBu0/edit?usp=sharing Questions in Mandarin: docs.google.com/spreadsheets/d/1aMCmSLucm7I_7BIRz1SqHy8c1D9h_6M8XAkrqWXSy8Y/edit?usp=sharing
#LeetCode 2485 | Find the Pivot Integer #Java
Переглядів 9День тому
Questions in English: docs.google.com/spreadsheets/d/1QNSEok-WD4LCPTrZlqq5VVTX0NbXQf27WUjkGi3aBu0/edit?usp=sharing Questions in Mandarin: docs.google.com/spreadsheets/d/1aMCmSLucm7I_7BIRz1SqHy8c1D9h_6M8XAkrqWXSy8Y/edit?usp=sharing
#LeetCode 2595 | Number of Even and Odd Bits #Java
Переглядів 10День тому
Questions in English: docs.google.com/spreadsheets/d/1QNSEok-WD4LCPTrZlqq5VVTX0NbXQf27WUjkGi3aBu0/edit?usp=sharing Questions in Mandarin: docs.google.com/spreadsheets/d/1aMCmSLucm7I_7BIRz1SqHy8c1D9h_6M8XAkrqWXSy8Y/edit?usp=sharing
#LeetCode 1135 | Connecting Cities With Minimum Cost #Java
Переглядів 1914 днів тому
Questions in English: docs.google.com/spreadsheets/d/1QNSEok-WD4LCPTrZlqq5VVTX0NbXQf27WUjkGi3aBu0/edit?usp=sharing Questions in Mandarin: docs.google.com/spreadsheets/d/1aMCmSLucm7I_7BIRz1SqHy8c1D9h_6M8XAkrqWXSy8Y/edit?usp=sharing
#LeetCode 2496 | Maximum Value of a String in an Array #Java
Переглядів 814 днів тому
Questions in English: docs.google.com/spreadsheets/d/1QNSEok-WD4LCPTrZlqq5VVTX0NbXQf27WUjkGi3aBu0/edit?usp=sharing Questions in Mandarin: docs.google.com/spreadsheets/d/1aMCmSLucm7I_7BIRz1SqHy8c1D9h_6M8XAkrqWXSy8Y/edit?usp=sharing
#LeetCode 2643 | Row With Maximum Ones #Java
Переглядів 1014 днів тому
Questions in English: docs.google.com/spreadsheets/d/1QNSEok-WD4LCPTrZlqq5VVTX0NbXQf27WUjkGi3aBu0/edit?usp=sharing Questions in Mandarin: docs.google.com/spreadsheets/d/1aMCmSLucm7I_7BIRz1SqHy8c1D9h_6M8XAkrqWXSy8Y/edit?usp=sharing
#LeetCode 2119 | A Number After a Double Reversal #Java
Переглядів 214 днів тому
Questions in English: docs.google.com/spreadsheets/d/1QNSEok-WD4LCPTrZlqq5VVTX0NbXQf27WUjkGi3aBu0/edit?usp=sharing Questions in Mandarin: docs.google.com/spreadsheets/d/1aMCmSLucm7I_7BIRz1SqHy8c1D9h_6M8XAkrqWXSy8Y/edit?usp=sharing
#LeetCode 1150 | Check If a Number Is Majority Element in a Sorted Array #Java
Переглядів 821 день тому
Questions in English: docs.google.com/spreadsheets/d/1QNSEok-WD4LCPTrZlqq5VVTX0NbXQf27WUjkGi3aBu0/edit?usp=sharing Questions in Mandarin: docs.google.com/spreadsheets/d/1aMCmSLucm7I_7BIRz1SqHy8c1D9h_6M8XAkrqWXSy8Y/edit?usp=sharing
#LeetCode 2728 | Count Houses in a Circular Street #Java
Переглядів 1221 день тому
Questions in English: docs.google.com/spreadsheets/d/1QNSEok-WD4LCPTrZlqq5VVTX0NbXQf27WUjkGi3aBu0/edit?usp=sharing Questions in Mandarin: docs.google.com/spreadsheets/d/1aMCmSLucm7I_7BIRz1SqHy8c1D9h_6M8XAkrqWXSy8Y/edit?usp=sharing
#LeetCode 2913 | Subarrays Distinct Element Sum of Squares I #Java
Переглядів 1421 день тому
Questions in English: docs.google.com/spreadsheets/d/1QNSEok-WD4LCPTrZlqq5VVTX0NbXQf27WUjkGi3aBu0/edit?usp=sharing Questions in Mandarin: docs.google.com/spreadsheets/d/1aMCmSLucm7I_7BIRz1SqHy8c1D9h_6M8XAkrqWXSy8Y/edit?usp=sharing
#LeetCode 2894 | Divisible and Non-divisible Sums Difference #Java
Переглядів 621 день тому
Questions in English: docs.google.com/spreadsheets/d/1QNSEok-WD4LCPTrZlqq5VVTX0NbXQf27WUjkGi3aBu0/edit?usp=sharing Questions in Mandarin: docs.google.com/spreadsheets/d/1aMCmSLucm7I_7BIRz1SqHy8c1D9h_6M8XAkrqWXSy8Y/edit?usp=sharing
#LeetCode 89 | Gray Code #Java
Переглядів 15Місяць тому
Questions in English: docs.google.com/spreadsheets/d/1QNSEok-WD4LCPTrZlqq5VVTX0NbXQf27WUjkGi3aBu0/edit?usp=sharing Questions in Mandarin: docs.google.com/spreadsheets/d/1aMCmSLucm7I_7BIRz1SqHy8c1D9h_6M8XAkrqWXSy8Y/edit?usp=sharing
#LeetCode 2269 | Find the K-Beauty of a Number #Java
Переглядів 12Місяць тому
Questions in English: docs.google.com/spreadsheets/d/1QNSEok-WD4LCPTrZlqq5VVTX0NbXQf27WUjkGi3aBu0/edit?usp=sharing Questions in Mandarin: docs.google.com/spreadsheets/d/1aMCmSLucm7I_7BIRz1SqHy8c1D9h_6M8XAkrqWXSy8Y/edit?usp=sharing
#LeetCode 2164 | Sort Even and Odd Indices Independently #Java
Переглядів 31Місяць тому
#LeetCode 2164 | Sort Even and Odd Indices Independently #Java
#LeetCode 2490 | Circular Sentence #Java
Переглядів 7Місяць тому
#LeetCode 2490 | Circular Sentence #Java
#LeetCode 157 | Read N Characters Given Read4 #Java
Переглядів 17Місяць тому
#LeetCode 157 | Read N Characters Given Read4 #Java
#LeetCode 2706 | Buy Two Chocolates #Java
Переглядів 11Місяць тому
#LeetCode 2706 | Buy Two Chocolates #Java
#LeetCode 2869 | Minimum Operations to Collect Elements #Java
Переглядів 82 місяці тому
#LeetCode 2869 | Minimum Operations to Collect Elements #Java
#LeetCode 1640 | Check Array Formation Through Concatenation #Java
Переглядів 62 місяці тому
#LeetCode 1640 | Check Array Formation Through Concatenation #Java
#LeetCode 1893 | Check if All the Integers in a Range Are Covered #Java
Переглядів 92 місяці тому
#LeetCode 1893 | Check if All the Integers in a Range Are Covered #Java
#LeetCode 1481 | Least Number of Unique Integers after K Removals #Java
Переглядів 62 місяці тому
#LeetCode 1481 | Least Number of Unique Integers after K Removals #Java
#LeetCode 625 | Minimum Factorization #Java
Переглядів 82 місяці тому
#LeetCode 625 | Minimum Factorization #Java
#LeetCode 696 | Count Binary Substrings #Java
Переглядів 42 місяці тому
#LeetCode 696 | Count Binary Substrings #Java
#LeetCode 603 | Consecutive Available Seats #SQL
Переглядів 92 місяці тому
#LeetCode 603 | Consecutive Available Seats #SQL
#LeetCode 1566 | Detect Pattern of Length M Repeated K or More Times #Java
Переглядів 52 місяці тому
#LeetCode 1566 | Detect Pattern of Length M Repeated K or More Times #Java
great solution but wish you explained it more
I'm glad you enjoyed the solution. Is there a specific part you would like me to expand upon?
Hey, What do you do now? I am looking for a new job opportunity, gotta grind on leetcode. How would you do it if you were me?
Keep practicing LeetCode consistently, whether it’s easy, medium, or hard problems. Focus on truly understanding the problem and improving your problem-solving skills. This not only prepares you for coding rounds but also helps you showcase your ability to handle real-world projects effectively within a firm.
Thank you for simple Explanation.
Great video solution thank you
super
worst problem in leetcode
thanks for watching
Do you have a list of topics for competitive programming where minimum prerequisites are required?
sorry, I don't have that things
No.238 link in the Google sheet turn out to be this vedio....
good catch, let me update it. thanks
@@sleepycracker4732 Thank you!
amazing breakdown
If we’re putting all the transactions in hashmap in the first for loop, then in the 2nd for loop when we’re going through all the transactions, wouldn’t we see the same transaction at both places and time will be the same too and so it will be within the 60 minute window since you put <= sign and not <. And all the transactions would be invalid by default due to that?
Oh nvm, there’s another condition that the city should be different, if it could be the same then there would be some problems. Thank you, very helpful video, learnt alot!
good comment. glad you get it
your approach is pretty good but it's effectively the same as sorting all intervals initially which would have a time complexity (TC) of O((n×m)log(n×m)) during heap initialization, you are pushing all intervals into the heap. this costs n×m intervals in total where n is # of employees & m is the # of intervals inserting each one into the heap takes O(log(n×m)) time. The total time to insert all intervals would be O(n×mlog(n×m)). heap Ops: after heap is initialized with all intervals, you still need to pop each interval one by one and merge them. each pop op takes O(log(n×m)), and you need to do this for all n×m intervals, so the total time for this step is also O(n×mlog(n×m)) an optimized approach would be to push the first interval of each employee and then push the next interval dynamically as we process. this minimizes heap size to n (the # of employees). this approach effectively reduces to Merging K Sorted Lists that has a TC of O(n×mlogn) which is better than O(n×mlog(n×m))
W feedback. you are correct.
time complexity will be O(n^2)
for the worst-case scenario, that's correct. The average case, it is going to be O(N)
@@sleepycracker4732 yes 👍 but we can use sweep algo + prefix sum for optimal solution
that's correct.
Thanks bro. Really worked.
I really appreciate your work , I guess you didn't insert this video link(386.Lexicographical Numbers) in English Google Spread Sheet. Make sure you update and advance in thanks :)
Bro you explain too fast . But good explanation. Can you upload video of every Daily Leetcode question?
If I went too fast, feel free to slow down the video or pause it to better absorb the information. As for the daily LeetCode question, I don’t think I have enough time for it right now, but I’ll consider it as a suggestion.
Are you XT who works in Google?
huh?
Are you chinese?
You Hardwork will Never get wasted , Your Well Deserving
Not able to understand time and space comllexity
to be honest, I am not sure the time and space complexity, but if you are using catalan solution. it should have an answer closes to that formula at 8:16
Hey, just wanted to say this video really helped, I hope that you become the top result/answer for this problem.
Can I give you a testcase where this fails?
maybe you can copy my code from video and run it on your Leetcode debugger to analyze the testcase itself
Old solution: ua-cam.com/video/uwMrZ_z4LIg/v-deo.html (audio issue)
Excellent explanation...
thanks for solution... can we have another solution too whose time complexity will be lesser than this ???
thanks, but this is my best solution.
Thank you...approach was easy to understand
Awesome explanation!!!
Thank you 😊
Good Effort, please keep it up.
i did'nt understand the for each loop here, can you explain
Very cool technique. Thank you :-)
U could provide a link to the codebase or preferably give the code in the comments. :)
good advice, but I don't like to give away code like that.
Bruteforce method and 5 ms runtime :(
thanks a lot!
If you are making video of something , shouldn't you be clear and well heard . additionally you should pronounce words properly .just a feedback after watching your video
thanks for watching. I am making the video for myself. Best,
Good Approach💯
Thank you for the code and the explanation. Keep up the good work.
Best Explaination
thank you man :)
Dude, thanks!
NICE SUPER EXCELLENT MOTIVATED
Bro's cooking very quiet in silence
those keyboard clicks are so irritating
I am a gamer
Thank you bhaiya, it is very helpful 😊
❤me too lol
similar question: ua-cam.com/video/hwgZAy8oRRk/v-deo.html
similar question: ua-cam.com/video/HVBxIP1zcPY/v-deo.html
the old video can be accessed through here: ua-cam.com/video/rtkAsSUjpQ0/v-deo.html However, youtube currently disable people to view it report: ua-cam.com/users/postUgkxRzAU91_3AwBrjd3otZb0lrKsueNfbiac
nice explanation!
Bro get a decent mic
Apologies, it was crafted two years back. However, the setup wasn't prepared at that time.
@@sleepycracker4732 No worries, great explanation tho