Fundamentals
/
Stack vs Queue - LIFO vs FIFO
⏸
00:00
↻
← Prev
Next →
▶
Question
Given an array of values, return two arrays: the order they would come out of a stack (LIFO) and the order they would come out of a queue (FIFO).
▶
My Code
▶
Reference Solution