Top Most Important Viva Question With Answer For Data Structure2
Top Most Important Viva Question With Answer For Data Structure2
Related Question with GTU MCA SEM 2 Data Structure Subject Syllabus
10. Q: Describe Binary Search and its requirement for ordered arrays.
A: Binary Search divides the sorted array in half at each step and narrows
down the search space, making it efficient for large datasets. It requires the
array to be sorted.
11. Q: Explain the data members and operations of the "Stack" data
structure.
A: The "Stack" data structure consists of an integer array and a stack pointer
(top of stack). The operations are Push, Pop, IsEmpty, IsFull, and Peep.
12. Q: How does the Push operation work in the stack?
A: The Push operation adds an element to the top of the stack, incrementing
the stack pointer.
13. Q: What happens during the Pop operation in the stack?
A: The Pop operation removes the element from the top of the stack,
decrementing the stack pointer.
14. Q: How do you check if the stack is empty using the IsEmpty function?
A: The IsEmpty function checks if the stack pointer is pointing to an empty
location in the stack (i.e., the stack is empty).
15. Q: Describe the Peep operation in the stack and its purpose.