![Sleepy Cracker](/img/default-banner.jpg)
- 1 093
- 125 759
Sleepy Cracker
Taiwan
Registrace 17. 04. 2021
#LeetCode 32 | Longest Valid Parentheses #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
zhlédnutí: 12
Video
#LeetCode 750 | Number Of Corner Rectangles #Java
zhlédnutí 5Před 16 hodinami
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 1708 | Largest Subarray Length K #Java
zhlédnutí 2Před 16 hodinami
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 2727 | Is Object Empty #Typescript
zhlédnutí 3Před 16 hodinami
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 1421 |. NPV Queries #SQL
zhlédnutí 4Před 14 dny
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 3005 | Count Elements With Maximum Frequency #Java
zhlédnutí 12Před 14 dny
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 570 | Managers with at Least 5 Direct Reports #SQL
zhlédnutí 3Před 14 dny
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 1784 | Check if Binary String Has at Most One Segment of Ones #Java
zhlédnutí 5Před 14 dny
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 2989 | Class Performance #SQL
zhlédnutí 2Před 14 dny
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 3000 | Maximum Area of Longest Diagonal Rectangle #Java
zhlédnutí 2Před 14 dny
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 1571 | Warehouse Manager #SQL
zhlédnutí 3Před 14 dny
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 2390 | Removing Stars From a String #Java
zhlédnutí 17Před 21 dnem
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 1633 | Percentage of Users Attended a Contest #Java
zhlédnutí 8Před 21 dnem
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 2923 | Find Champion I #Java
zhlédnutí 8Před 21 dnem
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 2570 | Merge Two 2D Arrays by Summing Values #Java
zhlédnutí 17Před 21 dnem
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 1874 | Minimize Product Sum of Two Arrays #Java
zhlédnutí 25Před 21 dnem
#LeetCode 1874 | Minimize Product Sum of Two Arrays #Java
#LeetCode 1083 | Sales Analysis II #Java
zhlédnutí 17Před měsícem
#LeetCode 1083 | Sales Analysis II #Java
#LeetCode 2176 | Count Equal and Divisible Pairs in an Array #Java
zhlédnutí 17Před měsícem
#LeetCode 2176 | Count Equal and Divisible Pairs in an Array #Java
#LeetCode 2853 | Highest Salaries Difference #Java
zhlédnutí 10Před měsícem
#LeetCode 2853 | Highest Salaries Difference #Java
#LeetCode 3024 | Type of Triangle #Java
zhlédnutí 12Před měsícem
#LeetCode 3024 | Type of Triangle #Java
#LeetCode 3014 | Minimum Number of Pushes to Type Word I #Java
zhlédnutí 12Před měsícem
#LeetCode 3014 | Minimum Number of Pushes to Type Word I #Java
#LeetCode 2960 | Count Tested Devices After Test Operations #Java
zhlédnutí 12Před měsícem
#LeetCode 2960 | Count Tested Devices After Test Operations #Java
#LeetCode 1865 | Finding Pairs With a Certain Sum #Java
zhlédnutí 8Před měsícem
#LeetCode 1865 | Finding Pairs With a Certain Sum #Java
#LeetCode 2937 | Make Three Strings Equal #Java
zhlédnutí 7Před měsícem
#LeetCode 2937 | Make Three Strings Equal #Java
#LeetCode 2352 | Equal Row and Column Pairs #Java
zhlédnutí 15Před měsícem
#LeetCode 2352 | Equal Row and Column Pairs #Java
#LeetCode 1661 | Average Time of Process per Machine #SQL
zhlédnutí 7Před měsícem
#LeetCode 1661 | Average Time of Process per Machine #SQL
#LeetCode 659 | Split Array into Consecutive Subsequences #Java
zhlédnutí 9Před měsícem
#LeetCode 659 | Split Array into Consecutive Subsequences #Java
#LeetCode 1353 | Maximum Number of Events That Can Be Attended #Java
zhlédnutí 18Před měsícem
#LeetCode 1353 | Maximum Number of Events That Can Be Attended #Java
#LeetCode 2210 | Count Hills and Valleys in an Array #Java
zhlédnutí 12Před měsícem
#LeetCode 2210 | Count Hills and Valleys in an Array #Java
#LeetCode 1089 | Duplicate Zeros #Java
zhlédnutí 23Před 2 měsíci
#LeetCode 1089 | Duplicate Zeros #Java
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: czcams.com/video/hwgZAy8oRRk/video.html
similar question: czcams.com/video/HVBxIP1zcPY/video.html
the old video can be accessed through here: czcams.com/video/rtkAsSUjpQ0/video.html However, youtube currently disable people to view it report: czcams.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
good solutions and easily understandable.
awesome, keep it up!
❤
I really appreciate your channel 🙌. I'm going to start doing leetcode again this month
great logic bro ...
you use js now!
I only know .length in js
good
Best explanation with Diagram, was struggling to understand this problem
very good solution and explanation
This is a genius solution, I couldn't fathom a bit of this. I tried to do a sliding window and splice out from the window.
Can you explain it clearly
Where did you get lost?
2 Pointer: czcams.com/video/BAKrAvGFL3Q/video.html HashMap: czcams.com/video/ze_viMxD9n8/video.html
DFS version1:czcams.com/video/KCaledGy-S8/video.html DFS version2: czcams.com/video/O9draJvnIFc/video.html BFS: czcams.com/video/eFRiufqFf2I/video.html
AWESOME
old version: czcams.com/video/IFmj-Jb3Hhg/video.html
if we iterate the bucket the tc is o(n) and than we iterate the list the tc is o(k) so why not ther tc of this soln is o(n*k), why its o(n) , if n is 9 and the k is 6 so u cant neglect the k
k is a given input which should be a constant in the question. However, I agree with you that the complexity of this solution is O(N*k).
old version: czcams.com/video/nglC6G23SOM/video.html
Brillant explanation thanks buddy
old version: czcams.com/video/pxbyjog6BcQ/video.html
Array: czcams.com/video/v2HDOC8usew/video.html DP: czcams.com/video/ZR1TpHJnHq0/video.html
DFS: czcams.com/video/3jzDkW4_WTE/video.html BFS: czcams.com/video/P0xqYQoK3fs/video.html
Oh, a reminder I need to practice! Will check out your other videos!
BFS old version: czcams.com/video/lmoC2alK7nY/video.html DFS old version: czcams.com/video/EaWCmwsW_uc/video.html
old version1: czcams.com/video/ttOCXU2T_dE/video.html old version2: czcams.com/video/NGR2fZ3YAYA/video.html
Please explain why atMost(k) - atMost(k-1) needed? I didn't dig deep to understand it.
think about this way. what are the sub array you have when k = 1? using the example 1: Input: nums = [1,2,1,2,3], the answer should be: 5. [1],[2],[1],[2],[3] what if k = 2? the answer is 7. [1,2], [2,1], [1,2], [2,3], [1,2,1], [2,1,2], [1,2,1,2]. but this is the sub arrays after you cut down the k=1 sub arrays. if you don't subtract the sub arrays, you should have [1],[2],[1],[2],[3],[1,2], [2,1], [1,2], [2,3], [1,2,1], [2,1,2], [1,2,1,2]. these are the result we have for atMost(2) in order to get the count of sub array to 7, we must minus atMost(1) hope this helps
@@sleepycracker4732 Yes it was not intuitive enough for me to figure out (j-i+1) is doing what you mentioned.
that is how we get the length of the subarray. it would be clear enough if you draw the index on a paper
@@sleepycracker4732 Yes I went to paper and drew it and it turned out true and made sense. Thanks