STL std::deque | Modern Cpp Series Ep. 120

Поділитися
Вставка
  • Опубліковано 29 вер 2024

КОМЕНТАРІ • 13

  • @mrdebug6581
    @mrdebug6581 Місяць тому +1

    bare minimum, but complete for a (first) use ... thank you for the series 👏

    • @MikeShah
      @MikeShah  Місяць тому

      @@mrdebug6581 cheers!

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

    I've definitely been mis-pronouncing it as "D-Q" haha. Another great video, thanks Mike!

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

      And I've been saying D-E-Q (double-ended queue)

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

      @@qcnck2776 @robertstrickland9722 I suspect there will be folks who also use "D-Q" and will know exactly what you're talking about which is the important part :)

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

    Another great lesson👏🏽🙏🏽❤️

  • @codigo-nodosyvfx
    @codigo-nodosyvfx Рік тому +2

    Very useful information, great video.

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

    Hello Mike. Thanks for this awesome series.
    Some clarifications on std::deque: it supports constant-time random access to its elements, much like an array or a std::vector. This is accomplished by using a dynamic array of pointers, each of which points to a block of elements. By doing a division and a modulo operation on an index, it can locate the block and element corresponding to that index. Unlike std::vector but similar to std::list, the elements of a std::deque are not stored in a contiguous block of memory. Instead, they are divided into multiple blocks. This has several benefits, such as avoiding the need to reallocate and copy all elements when the std::deque grows, which improves performance for certain operations.
    is that correct?!

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

    I just learn a lot from you
    Thanks man for your great channel