monyet.cc
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
@alexcoder04@programming.dev to Programmer Humor@programming.devEnglish • 2 years ago

Data structures…

programming.dev

message-square
13
fedilink
95

Data structures…

programming.dev

@alexcoder04@programming.dev to Programmer Humor@programming.devEnglish • 2 years ago
message-square
13
fedilink
  • @bronzing@lemmy.fmhy.ml
    link
    fedilink
    English
    6•2 years ago

    Can someone explain the joke? I know what stacks are but I don’t get it…

    • @Gentoo1337@sh.itjust.works
      link
      fedilink
      English
      4•
      edit-2
      2 years ago

      It’s the last element, so it has to wait for all the other elements on top of it to be popped in order to be accessed

      I think op meant last as in the element on the bottom

      • @bronzing@lemmy.fmhy.ml
        link
        fedilink
        English
        2•2 years ago

        Oh ok I guess that makes sense. Was it that obvious? 😅

      • @alexcoder04@programming.devOP
        link
        fedilink
        English
        2•2 years ago

        Yea, I meant the last element as in the one at the bottom, but now I see that it‘s a little confusing…

        • @Gentoo1337@sh.itjust.works
          link
          fedilink
          English
          1•2 years ago

          Yea I also thought the last one was the bottom one but then I remembered it was lifo

    • @wicked@programming.dev
      link
      fedilink
      English
      1•2 years ago

      Maybe it’s something about not knowing if the last element is the top of the stack or the bottom of the stack?

      • @DaleGribble88@programming.dev
        link
        fedilink
        English
        1•2 years ago

        Split the difference, it is the only element in a deque.

    • @fullcircle@vlemmy.net
      link
      fedilink
      English
      1•2 years ago

      He looks like he’s guarding something? A sentinel value in an array-based stack implementation in C or something? I don’t know, I’m a bit confused too.

Programmer Humor@programming.dev

!programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
  • 1.05K users / day
  • 4.04K users / week
  • 10.1K users / month
  • 19.6K users / 6 months
  • 24.3K subscribers
  • 1.52K Posts
  • 56.6K Comments
  • Modlog
  • mods:
  • Feyter
  • adr1an
  • @BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne
  • BE: 0.19.3
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org