Which of the following is not an inherent application of stack ?
2016
Which of the following is not an inherent application of stack ?
- A.
Implementation of recursion
- B.
Evaluation of a postfix expression
- C.
Job scheduling
- D.
Reverse a string
Attempted by 1033 students.
Show answer & explanation
Correct answer: C
Answer: Job scheduling is not an inherent application of a stack.
Key idea: A stack follows Last-In-First-Out (LIFO) order and is used when the most recently added item must be accessed first.
Implementation of recursion: Recursion relies on a call stack to save return points and local state, making stacks an inherent tool for recursion.
Evaluation of a postfix expression: The standard algorithm pushes operands onto a stack and pops them when an operator is applied, so postfix evaluation naturally uses a stack.
Reverse a string: Push each character onto a stack and then pop to obtain the reversed order; this uses the stack's LIFO behavior directly.
Job scheduling: Scheduling typically requires FIFO queues or priority-based selection rather than LIFO access. Because scheduling decisions do not inherently require the most-recently-added item to be processed first, job scheduling is not an inherent application of a stack.
Conclusion: Job scheduling is the correct choice because it does not naturally depend on LIFO behavior the way the other tasks do.