You can definitely do this. But you can have None as the value without it too. We are not checking if the node value is None. We check if the node itself is None. And that should not be the case unless the stack is empty. A None value cannot point to a next element.
@@NeuralNine Ahh! Got you. Sometimes I forget to read the fine print. Also probably some personal bias on my part since I always implemented these myself using size as the empty check (which was how I was taught long ago... as in the early Dr Dobb's days.) Awesome as always, thanks for responding and correcting my errant viewpoint..
Great video. My only suggestion is if you could say where we use this structures in practice, perhaps give us some examples (like it was roughly done here: watch?v=k0bb7UYy0pY , e.g.: queue in network traffic, private heap as main Python memory data structure, something like that.
@Tony-dp1rl This tutorial series is not about implementing things in the most straightforward way. When we get to hash maps we also won't just use a Python dictionary but implement our own hashing algorithm, collision handling etc. It is about understanding the mechanisms behind the data structures.
This is my seal. I have watched the entire video, understood it, and I can explain it in my own words, thus I have gained knowledge. This is my seal.
❤❤keep it coming please
I will! :)
Can you create a video, how to chat with my data with llamaindex and olama.
Wouldn't checking empty by size == 0 be better as then None could be a value on the stack?
🖖👍
I agree it would be more general
You can definitely do this. But you can have None as the value without it too. We are not checking if the node value is None. We check if the node itself is None. And that should not be the case unless the stack is empty. A None value cannot point to a next element.
@@NeuralNine Ahh! Got you. Sometimes I forget to read the fine print. Also probably some personal bias on my part since I always implemented these myself using size as the empty check (which was how I was taught long ago... as in the early Dr Dobb's days.)
Awesome as always, thanks for responding and correcting my errant viewpoint..
Great video. My only suggestion is if you could say where we use this structures in practice, perhaps give us some examples (like it was roughly done here: watch?v=k0bb7UYy0pY , e.g.: queue in network traffic, private heap as main Python memory data structure, something like that.
Love 🎉it
🎉
Hi sir .i need a help from of ML project of Dyslexia detection via video . please help me sir
Love your videos, but that is a very complex way to do a stack compared to just using a list and adding/subtracting to it.
Actually this is the right way of implementing stack. This how comparitively low level languages like in C we implement DSA
@Tony-dp1rl This tutorial series is not about implementing things in the most straightforward way. When we get to hash maps we also won't just use a Python dictionary but implement our own hashing algorithm, collision handling etc. It is about understanding the mechanisms behind the data structures.