Thank you bro. Clean explenation :) Helped me a lot!
@fiskfisk33 Жыл бұрын
O(1) for deleting an element in an array is debatable, if you want to move the above elements down to fill the gap it gets slower.
@DailyFacts-vu4cvАй бұрын
thanks bro
@amruthaj42629 ай бұрын
I just wanna know, is the time complexity O(1) for a Linked List at the head and tail?
@nikoo288 ай бұрын
to add an element at the tail of the linked list, the time complexity is O(n). to add at the head, the time complexity is O(1)
@amruthaj42628 ай бұрын
@@nikoo28Thank you
@puriatc10896 ай бұрын
ok but , how it uses hashing to do all this operations in O(1) time complexity? thats what i wanted to know :(
@nikoo285 ай бұрын
Those are the internal details on how a hashset actually works. I will create a separate video on hashing sometime in the future.
@anmolverma0752 жыл бұрын
Sir , where can I contact you? I need some help.
@nikoo282 жыл бұрын
Check the channel description, you will find an email address to reach out. You can also comment here
@anmolverma0752 жыл бұрын
I cannot sir. Can we talk on LinkedIn or Discord/Twitter?
@nikoo282 жыл бұрын
Send me an email
@ap-learner3 ай бұрын
You said it O(1) for reading but not explained why it is, Please explain
@nikoo283 ай бұрын
you will have to understand the internals of a HashSet data structure. I plan to make a video on it in my System Design series
@ET-Programming Жыл бұрын
deleting an element from an Array is o(1) only for if the element is the last element on the array ,so if i want to remove an element from middle it is o(n) ,
@nikoo28 Жыл бұрын
in an array, you can go straight to an index. That means O(1)
@saiprasad57792 жыл бұрын
How it different from dictionary
@nikoo282 жыл бұрын
It is almost the same as a dictionary…the major difference is that a hashset is synchronised (works good in a multi threading code) The use of Dictionary is now kind of obsolete and deprecated. You are not advised to use a Dictionary