Consider the following statements:
$S_1$: If a STACK is implemented through a LINKED LIST, $\text{PUSH}$ operation will take $O\left ( 1 \right )$ time and $\text{POP}$ operation will take $O\left ( n \right )$ time.
$S_2$: If a QUEUE is implemented through an ARRAY, $\text{ENQUEUE}$ operation will take $\Theta \left ( \log n \right )$ time and $\text{DEQUEUE}$ operation will take $O\left ( 1 \right )$ time.
Which of the above statements is/are TRUE?
- Only $S_1$ is correct.
- Only $S_2$ is correct.
- Neither $S_1$ nor $S_2$ is correct.
- Both $S_1$ and $S_2$ are correct.