Stack - Data Structures in Python #2

Поділитися
Вставка
  • Опубліковано 7 січ 2025

КОМЕНТАРІ • 18

  • @JoeTan-nq4fq
    @JoeTan-nq4fq Місяць тому

    Great and easy to undertsand lesson in implementing stack ground up (although Python has drastically simplified it by using list). It will be good to show some useful stack type - eg the monotonic stack.

  • @JialuChen-f1x
    @JialuChen-f1x 25 днів тому +1

    bro these videos help me with my CSC1001 final greatly.Thank you too much

  • @piotrmazgaj
    @piotrmazgaj 2 місяці тому +2

    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.

  • @thomasgoodwin2648
    @thomasgoodwin2648 2 місяці тому +2

    Wouldn't checking empty by size == 0 be better as then None could be a value on the stack?
    🖖👍

    • @MrChrismccooey
      @MrChrismccooey 2 місяці тому +1

      I agree it would be more general

    • @NeuralNine
      @NeuralNine  2 місяці тому +1

      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.

    • @thomasgoodwin2648
      @thomasgoodwin2648 2 місяці тому

      @@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..

  • @coolguy-zm7tn
    @coolguy-zm7tn 2 місяці тому +3

    ❤❤keep it coming please

  • @piotrmazgaj
    @piotrmazgaj 2 місяці тому

    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.

  • @superfreiheit1
    @superfreiheit1 2 місяці тому

    Can you create a video, how to chat with my data with llamaindex and olama.

  • @VictorV5
    @VictorV5 2 місяці тому

    Hi sir .i need a help from of ML project of Dyslexia detection via video . please help me sir

  • @SinergiasHolisticas
    @SinergiasHolisticas 2 місяці тому +3

    Love 🎉it

  • @Tony-dp1rl
    @Tony-dp1rl 2 місяці тому

    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.

    • @charan1161
      @charan1161 2 місяці тому +1

      Actually this is the right way of implementing stack. This how comparitively low level languages like in C we implement DSA

    • @NeuralNine
      @NeuralNine  2 місяці тому +2

      @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.