Very easy to understand! Tried to understand skip list many times but failed, but successfully implemented it right away after seeing this video, thanks!
You just saved my whole trimester. Litterally. I can't thank you enough, the videos on the trees and everything, they are beyond excellent. English isn't even my first language, but your videos are so well explained, I understand everything. Thank you so much, it means a whole lot to me!! :)
I'm glad this helped! It's been a couple years since I made this, but if you need anything, I think I have my slides I can give. Yeah, I totally get how the profs work lol.
I honestly never comment on videos, but I really appreciate your GREAT explanation on SkipLists, it helped me understand the probabilistic structure of this data structure. Thank you for your effort and time! :)
Objects are expensive and references are expensive but they just keep sprouting everywhere. (for example javascript object reference is 8 entire bits!) This is definitely for low level languages only.
Hey, yeah for the end nodes, I just hard coded them as positive and negative infinity. WHICH, really is just the highest and lowest integer allowed. Yeah so when a level is increased, just add them as beginning and end nodes of that level. Let me know if that helped at all
Well it’s just something to compare to right so it may not work if you don’t have something there. The idea is you should never have a number below neg inf, and shouldn’t have one above pos inf.
I see this is two years old now, but in the event this is implemented in a garbage collected language shouldn't you also set the above and below references for each 25 node to null in order for it the associated memory to be collected? If it is not, In larger lists this could lead to portions of heap memory to never be deallocated.
Hmm, that may be true. And yeah I agree this algorithm or code could be more efficient. Always a way to improve it. But it would need to be coded differently in a language not using garbage collection.
Hey! Sorry to bother you but the insertNewNode is a separate function, right? And if you can explain it a little more because I don’t really get how to implement that part. Thanks for the help! Have a nice day:)
a good implementation, but I don't think nodes in a skiplist are meant to have an above/previous reference? I guess you could make it doubly linked , but this would take up a lot more memory than is necessary.
Yes you are correct you don’t need an above and previous reference. That would clean up the code more. I just added them to help explain and to test to make sure we can traverse properly. But it would be less code leaving them out. Good catch!
Not all values are integers or even numbers though, are they? When in the real world are you sorting and searching for something as simple as a sparse set of integers? The answer is never. So you dont have plus or minus infinity, you have null pointers at each end.
Well I don’t think anybody said you would always use a set of a certain type for sorting or searching, it’s more of how the algorithm works. If you use it for a different object type or primitive value then some things would need changed yes! But you are right in the real world you may never use a set of integers.
Very easy to understand! Tried to understand skip list many times but failed, but successfully implemented it right away after seeing this video, thanks!
You just saved my whole trimester. Litterally. I can't thank you enough, the videos on the trees and everything, they are beyond excellent. English isn't even my first language, but your videos are so well explained, I understand everything. Thank you so much, it means a whole lot to me!! :)
Hey thank you so much! I appreciate that and I’m so glad I helped you out. 😁
never comment on any videos until I have skip list slides from prof with a few texts plus "easy" word, this video saves my life, tks so much!
I'm glad this helped! It's been a couple years since I made this, but if you need anything, I think I have my slides I can give. Yeah, I totally get how the profs work lol.
I honestly never comment on videos, but I really appreciate your GREAT explanation on SkipLists, it helped me understand the probabilistic structure of this data structure. Thank you for your effort and time! :)
Thank you I truly appreciate that and I’m happy it has helped you understand Skip Lists!
Objects are expensive and references are expensive but they just keep sprouting everywhere. (for example javascript object reference is 8 entire bits!)
This is definitely for low level languages only.
excellent explanation ... better than my lecture ..
mashallah bro saved my exams
Happy to help! I’m thankful that you watched my video, appreciate it 🙏
Great explanation :)
thank you, I hope it was helpful in your understanding 🙌
How would you implement the end nodes? Would you hardcode them into the list and then increase their levels as needed?
Hey, yeah for the end nodes, I just hard coded them as positive and negative infinity. WHICH, really is just the highest and lowest integer allowed.
Yeah so when a level is increased, just add them as beginning and end nodes of that level.
Let me know if that helped at all
@@TylerReedAI Makes perfect sense!. Your video helped out a lot in getting my skiplist to work, thank you!
What happens when you remove positive infinity and negative infinity from the lists? Just curious
Well it’s just something to compare to right so it may not work if you don’t have something there. The idea is you should never have a number below neg inf, and shouldn’t have one above pos inf.
@@TylerReedAI Thank you💯
Very well explained sir thank u so much .
Plz can u upload linked list parts also.
I see this is two years old now, but in the event this is implemented in a garbage collected language shouldn't you also set the above and below references for each 25 node to null in order for it the associated memory to be collected? If it is not, In larger lists this could lead to portions of heap memory to never be deallocated.
Hmm, that may be true. And yeah I agree this algorithm or code could be more efficient. Always a way to improve it. But it would need to be coded differently in a language not using garbage collection.
Hey!
Sorry to bother you but the insertNewNode is a separate function, right? And if you can explain it a little more because I don’t really get how to implement that part.
Thanks for the help!
Have a nice day:)
can you do a full implementation
thats a 10, well done
Thanks man :)
Plz provide code for that...grate explanation ✨
a good implementation, but I don't think nodes in a skiplist are meant to have an above/previous reference? I guess you could make it doubly linked , but this would take up a lot more memory than is necessary.
Yes you are correct you don’t need an above and previous reference. That would clean up the code more. I just added them to help explain and to test to make sure we can traverse properly. But it would be less code leaving them out. Good catch!
Is there any full implementation you could provide? Like the video you have on stacks
Yes I can do that
@@TylerReedAI thank you so much
@@TylerReedAI like right now
with a node that points above, below, prev and next
@@TylerReedAI when can you post by?
great work you explained it well
I appreciate that!
would you be interested in learning reactjs or something else? or more data structures?
@@TylerReedAI data structures
Let me know what you think of the structure of the new Stack video if you get a chance!
"Ehh, it probably works"
- probabilistic skip lists.
Not all values are integers or even numbers though, are they? When in the real world are you sorting and searching for something as simple as a sparse set of integers? The answer is never. So you dont have plus or minus infinity, you have null pointers at each end.
Well I don’t think anybody said you would always use a set of a certain type for sorting or searching, it’s more of how the algorithm works. If you use it for a different object type or primitive value then some things would need changed yes! But you are right in the real world you may never use a set of integers.
@@TylerReedAI True, and it's easier for people to grasp the concept with an lower/upper limit rather than null. Thanks for the reply.