C++ STL std::queue a container adaptor | Modern Cpp Series Ep. 132

Поділитися
Вставка
  • Опубліковано 14 тра 2023
  • ►Full C++ Series Playlist: • The C++ Programming La...
    ►Find full courses on: courses.mshah.io/
    ►Join as Member to Support the channel: / @mikeshah
    ►Lesson Description: In this lesson I will show you a fundamental data structure -- the queue! Queues have two key operations, push and pop in computer science. The Queue is a FIFO (first in, first out) data structure as opposed to the stack which is a LIFO (Last in, First out) data structure. The STL organizes queue such that each operation does exactly one thing, and front, back, push,pop, and empty for example are as they sound. I'll also describe what it means to be a container adaptor, and that the qeue data structure itself enforces a policy, while the underlying data structure has impacts on performance. Finally, I'll describe to you a use case of queue as it's used for handling events.
    ►UA-cam Channel: / mikeshah
    ►Please like and subscribe to help the channel!
    ►Join our free community: courses.mshah.io/communities/...
  • Наука та технологія

КОМЕНТАРІ • 11

  • @thestarinthesky_
    @thestarinthesky_ Рік тому +1

    @10:41 Yesss! I really am interested in seeing creating one of those containers from scratch. That'd be a really cool video!

  • @thestarinthesky_
    @thestarinthesky_ Рік тому

    @10:41 Yesss! I really am interested in seeing creating one of those containers from scratch. That'd be a really cool video! and @12:31 and yes. I'd love to see that FIFO queue for concurrent programming!

  • @ghulam2545
    @ghulam2545 Рік тому +4

    I deeply value and admire your ongoing efforts and dedication. Currently, I am engrossed in the realm of deep learning and Python-based CNN for my academic pursuits, which regrettably leaves me with limited time to enjoy these videos.

    • @MikeShah
      @MikeShah  Рік тому

      Thank you for your kind words :) These videos aren't going anywhere when the time comes ;)

  • @qcnck2776
    @qcnck2776 Рік тому +2

    Could you touch briefly on the efficiency difference between using list vs deque as the base? One would think that a list would make more sense that a deque. A list also has an end iterator, and since we are only adding to the back and removing from the front, shouldn't these be constant time operations?

    • @MikeShah
      @MikeShah  Рік тому +3

      I will do a wrap-up video :) Short answer is a deque allocates small blocks versus a list whiich is essentially one element (one node) at a time

    • @qcnck2776
      @qcnck2776 Рік тому +1

      @@MikeShah 👍

  • @jeevanreddy7989
    @jeevanreddy7989 Рік тому +1

    Hi Mike...could you please cover hashmap container too as part of STL lecture series?

    • @MikeShah
      @MikeShah  Рік тому +1

      Yes, std::unordered_map and std::map are covered 😁

  • @VoidloniXaarii
    @VoidloniXaarii Рік тому +1

    Thanks again!