Which of the following array element will return the top-of-the-stack-element for a stack of size N elements

Q & ACategory: Data StructureWhich of the following array element will return the top-of-the-stack-element for a stack of size N elements
Admin Staff asked 4 years ago

Which of the following array element will return the top-of-the-stack-element for a stack of size N elements(capacity of stack > N).
a) S[N-1]
b) S[N]
c) S[N-2]
d) S[N+1]

1 Answers
Admin Staff answered 4 years ago

a) S[N-1]