this is the best explanation I've seen for this problem in JS by far. great work!
@advythashok2 жыл бұрын
Amazing! Your way of explanation is top notch, please keep doing more of these.
@jaredsuresky73863 жыл бұрын
Love your content, man - I love your explanations and code walk-through. Keep up the great work!
@leedc56744 жыл бұрын
I love you man. This is good shit keep it up. Hope your channel will blow up in subs and watch time soon
@alberthuynh Жыл бұрын
Thank you for creating this video! Best explanation I've found in Javascript
@ibeeliot4 жыл бұрын
Fuuuuuuck yeah, it's this guy again.
@farhansadeksakib58202 жыл бұрын
Awesome! Nice explanation. Learnt a lot.
@varunsukheja9492 жыл бұрын
thanks for the video. I have a doubt that instead of primes[] why didn't you use primesMap={ 'a':2, 'b':3, 'c':5, 'd':7 .....} ?
@gerryramosftw Жыл бұрын
hmm.. Looked up 4 solutions so far and everyone seems to sort. that makes this problem easy. what makes this a medium problem is getting the optimal solution
@cthulhu73973 жыл бұрын
Great, thank you so much!
@hchiam5 жыл бұрын
"Group the anagrams" is a good example of evolving a solution and making use of notes/hints. Go from O(N W log W) -> to O(N W): 1) Brute force at first: create keys using sorted version of strings. Sorting is the bottleneck. 2) Create unique keys using multiplication of the first 26 prime numbers for the 26 lowercase letters of the alphabet. (Maintaining hashtables as keys would be very verbose).