Stack Memory Top
Array Utilization
Complexity Matrix
| pushCall() | O(1) Time • O(1) Space |
| popCall() | O(1) Time • O(1) Space |
| peekCall() | O(1) Time • O(1) Space |
| viewCallLog() | O(n) Time • O(1) Space |
| Memory Footprint | 2,404 Bytes (Fixed) |
Stack (LIFO) • O(1) Push/Pop/Peek • Odd Sem 2026-2027
| pushCall() | O(1) Time • O(1) Space |
| popCall() | O(1) Time • O(1) Space |
| peekCall() | O(1) Time • O(1) Space |
| viewCallLog() | O(n) Time • O(1) Space |
| Memory Footprint | 2,404 Bytes (Fixed) |
Academic Submission for Odd Semester 2026-2027 • B.Tech Engineering
Mobile call history is inherently governed by Last-In-First-Out (LIFO) recency. When dialing or clearing calls, users interact with the most recent entry first. Using a Stack allows PUSH, POP, and PEEK in constant O(1) time.
An Array-based stack provides contiguous memory allocation, zero pointer overhead (saving 8 bytes per node on 64-bit systems), and maximum CPU cache locality. The bounded capacity MAX = 50 mirrors real mobile logs.
Push: O(1) | Pop: O(1) | Peek: O(1) | Traverse: O(n)
Space Complexity: O(MAX) fixed at compile-time (2,404 bytes), preventing dynamic heap fragmentation.
• Underflow: isEmpty(s) guards pop and peek when top == -1.
• Overflow: isFull(s) guards push when top == MAX - 1, preventing buffer overflows.
Welcome, Faculty Evaluator! This interactive web application is designed to demonstrate how theoretical Stack algorithms in C power the core "Recents" subsystem of everyday smartphones.
s->top++ and slot insertion.O(1) time.calls[s->top] with glowing highlight without modifying the stack.