MINIMUM DELETIONS TO MAKE CHARACTER FREQUENCIES UNIQUE | PYTHON | LEETCODE # 1647

  Рет қаралды 1,867

Cracking FAANG

Cracking FAANG

Күн бұрын

Пікірлер: 12
@Justice4x
@Justice4x 2 жыл бұрын
really awesome job man! was stuck on this question for a couple hours. searched around youtube and your explanation was the best one. period.
@crackfaang
@crackfaang 2 жыл бұрын
Thank you for the kind words! If there’s any videos you’d like to see, let me know and I can make the videos
@izzuddinsyamil1479
@izzuddinsyamil1479 2 жыл бұрын
same! this is the best solution to understand and follow thanks
@xRoshtack
@xRoshtack 2 жыл бұрын
Great video!
@crackfaang
@crackfaang 2 жыл бұрын
Glad you enjoyed the video! Make sure to subscribe and let me know if there’s any problems you’d like me to make videos for
@xRoshtack
@xRoshtack 2 жыл бұрын
@@crackfaang Can you do Leetcode 2060?
@subee128
@subee128 10 ай бұрын
Thanks
@symbol767
@symbol767 2 жыл бұрын
Wow this solution is epic and really great explaination, you're super underrated dude. Liked! We gotta get you more popular, this video is too good
@ThisIsntmyrealnameGoogle
@ThisIsntmyrealnameGoogle 2 жыл бұрын
awesome explanation! Subscribed!
@abdullahgarra8477
@abdullahgarra8477 2 жыл бұрын
I don't really get why it is O(N)🤔
@TheQuancy
@TheQuancy 2 жыл бұрын
Just because there is a nested loop, doesnt necessarily mean that its N^2 The for loop is iterating through the frequency dictionary, while the while loop is iterating through the hashset. If the while loop was also iterating through the dictionary, then yes, it would be N^2, but its 2 separate data structures
@ebenezeracquah478
@ebenezeracquah478 Жыл бұрын
The reason is that the for loops are not nested. There are two separate for loops. The first one is in Counter(s) which traverse s and stores it in key-value pairs in a dictionary. And the second for loop traverses the key-value pairs to delete the keys with equal counts. So as he said the time complexity is O(n) + O(n) which is ultimately O(n).
CUSTOM SORT STRING | PYTHON | LEETCODE # 791
10:33
Cracking FAANG
Рет қаралды 6 М.
Мама у нас строгая
00:20
VAVAN
Рет қаралды 11 МЛН
How to code like a FAANG Software Engineer - Follow this one pattern!
13:28
MINIMUM NUMBER OF REFUELING STOPS | LEETCODE # 871 | PYTHON SOLUTION
19:32
Insert Delete GetRandom O(1) - Leetcode 380 - Python
13:27
NeetCode
Рет қаралды 51 М.
Hashing in Python: Using Hashlib Library for Secure Hashing
15:42
New 21 Game - Leetcode 837 - Python
19:03
NeetCodeIO
Рет қаралды 13 М.
Largest Color Value in a Directed Graph - Leetcode 1857 - Python
22:11