cm0002@suppo.fi to Programmer Humor@programming.dev · 23 days agoForthimagemessage-square4linkfedilinkarrow-up12arrow-down10file-text
arrow-up12arrow-down1imageForthcm0002@suppo.fi to Programmer Humor@programming.dev · 23 days agomessage-square4linkfedilinkfile-text
minus-squaredavidgro@lemmy.worldlinkfedilinkarrow-up1·23 days agoThisgreatisone! ? If the operands go the other way, I suppose: oneisgreatThis!
minus-squareotacon239@lemmy.worldlinkfedilinkarrow-up1·23 days agoThe stack doesn’t quite work like that. They would get added like this: This > buffer great, is, one > stack Then, each + pulls the latest off the stack and operates. First + would pull ‘one’ as it’s the most recent on the stack. This page does a good job of explaining: https://www.geeksforgeeks.org/dsa/introduction-to-stack-data-structure-and-algorithm-tutorials/ Edit: you can also see this reflected in the Alt-text: I NOTATION POLISH REVERSE ❤️
This
great
is
one
+
+
+
!
Thisgreatisone! ?
If the operands go the other way, I suppose:
oneisgreatThis!
The stack doesn’t quite work like that. They would get added like this:
This > buffer
great, is, one > stack
Then, each + pulls the latest off the stack and operates.
First + would pull ‘one’ as it’s the most recent on the stack.
This page does a good job of explaining: https://www.geeksforgeeks.org/dsa/introduction-to-stack-data-structure-and-algorithm-tutorials/
Edit: you can also see this reflected in the Alt-text:
I NOTATION POLISH REVERSE ❤️