An interactive, cyberpunk-themed web app that brings Stack and Queue data structures to life using a kitchen analogy.
Open index.html directly in any modern browser โ no server or build step needed.
| Data Structure | Real-Life Analogy | Behaviour |
|---|---|---|
| Queue | Conveyor Belt (Incoming Orders) | FIFO โ First In, First Out |
| Stack | Wash Basin (Sink) | LIFO โ Last In, First Out |
Plates (orders) enter the conveyor belt via the queue, get transferred to the sink one by one, and are washed (popped) from the top of the stack.
- ENQUEUE ORDER โ Adds a new plate to the conveyor belt (queue).
- TRANSFER TO SINK โ Removes the front plate from the belt (dequeue) and drops it into the wash basin (push onto stack).
- WASH TOP โ Removes and washes the top plate from the sink (pop from stack).
Both the queue and stack hold a maximum of 5 plates. Error modals appear if you try to exceed the limit or operate on an empty structure.
โโโ index.html # App layout and UI markup
โโโ style.css # Neon/cyberpunk theme, animations, 3D transforms
โโโ script.js # Queue & stack logic, DOM manipulation, animations
- ๐จ Neon cyberpunk UI with 3D CSS transforms and glow effects
- ๐ฌ Smooth animations โ plates slide in, fly across, and spin out
- ๐ Live stat bars that turn red when a structure is full
- ๐จ Error modal for overflow and empty-structure operations
- ๐ Operation lock (
isBusyflag) prevents animation conflicts
- HTML5 โ semantic structure
- CSS3 โ custom properties, keyframe animations, 3D perspective
- Vanilla JavaScript โ no frameworks or dependencies
- Google Fonts โ Orbitron & Roboto
- Understand FIFO (Queue) vs LIFO (Stack) behaviour visually
- See how
Array.push()/Array.shift()/Array.pop()map to real data structure operations - Observe how animations can make abstract CS concepts tangible