Questions tagged [lifo]

LIFO is an acronym that stands for last in, first out. In computer science and queueing theory this refers to the way items stored in some types of data structures are processed.

LIFO is an acronym that stands for last in, first out. In computer science and queueing theory this refers to the way items stored in some types of data structures are processed.

63 questions
-1
votes
1 answer

indexing confusion Stack LIFO

I've been teaching myself Java with http://www.cs.princeton.edu/courses/archive/spr15/cos126/lectures.html as a reference. I was just going over the topic of Stack and they had the following code as an example import…
stratofortress
  • 453
  • 1
  • 9
  • 21
-2
votes
1 answer

handling luggage using python? last container in, last out, first luggage in first out

How do you solve this problem using python? You load luggage into container. Once container reaches its limit (100 lbs). You move onto the next container. This is how you load the luggage. When it is time to unload the data, you will first unload…
shabieh2
  • 11
  • 3
-2
votes
1 answer

Comparing Stacks of Doubles resulting in Always Equal

I'm trying to compare two stacks, to see if they are equal. Unfortunately, this code makes it so all of my comparisons say the stacks are equal, even if the stacks are not. Stack_implementation.cpp snippet: int DoubleStack::operator==(DoubleStack&…
ardunn
  • 79
  • 2
  • 9
1 2 3 4
5