+ 1
Why set is unordered? How internally set working?
Anyone please explain this clearly. I am expecting that you people should answer it easily. Thanks in advance. Jan Markus mitali jadhavrao
3 RĂ©ponses
+ 4
The Great Saga
Jan Markus has already explained how set is implemented internally.When searching a element of list you have to look through the entire memory to find it which makes it slower.On the other hand in case of sets you will be looking for a particular hash which makes it faster.
Example:You need to find a book in library.You dont know what category it belongs to so it takes a lot of time to find it.
But on other hand you know the book you need to find is mythological so you search for it in mythological section which makes it faster.
+ 4
Jan Markus It's a pleasure for međđ
0
Jan Markus Thanks for the reply. could you please explain how sets are faster than list?
Do you have any coding example?