3 ms·
Oops, my bad. I seem to have misread. Sorry.
by hansmayer 1y ago
Oops, my bad. I seem to have misread. Sorry.
- thinkcritical 1y agoNo, a stack is LIFO like it said. A queue is FIFO or in other words LILO “Last In Last Out”.
- koakuma-chan 1y agoMy last job was at the office. I had my work queue implemented as a stack of files. I would sit at my desk and, in an infinite loop, pop files from my stack and process them. Occasionally, my supervisor would come and push a new file onto my stack. A naive worker would think that, once I was done with my stack, I could finally get some sleep, but no. Our office implemented something called "work stealing," where, once I was done with my own work, I had to visit a random co-worker and pop files from their stack.
- lovasoa 1y agoNo. The LLM's answer is correct.