Wowwwww. Thought it will take atleast 3-4 vidoes to understand this problem. Glad I watched your video first. Great and clearrrr explanation. Thanks dude.
@@techdose4u yes and I was always watching just enough so that I get the key concept that was required... and I tell you the moment you told min is going to be next of head and max is going to be prev of tail.... damn I got the whole code and that too clean!
Can’t we only hashmap only to implement this? Why we need linked list or array here ? As we can store frequencies of those keys in the map instead of object
Wowwwww. Thought it will take atleast 3-4 vidoes to understand this problem. Glad I watched your video first. Great and clearrrr explanation. Thanks dude.
A well thought explanation.
I am impressed.❤
Thanks :)
@@techdose4u yes and I was always watching just enough so that I get the key concept that was required...
and I tell you the moment you told min is going to be next of head and max is going to be prev of tail....
damn I got the whole code and that too clean!
Can’t we only hashmap only to implement this? Why we need linked list or array here ? As we can store frequencies of those keys in the map instead of object
every map value part should be pointing to next entry.
If you try with the example which I have taken in dry run you will get it clear :)
Didn't understand how adding a new string is O(1) time. Doesn't it take O(n) time in DLL to add a new element so that DLL is sorted.
Because we know the location of node from hashmap where to insert.
Please follow the entire video, I have shown this in dry run too and also in code.
A new string will always be added to the beginning only
Makes sense now