What does the peek (or top) operation on a stack do?
- AReturns the bottom element of the stack
- BRemoves the top element and returns it
- CReturns the top element without removing it
- DRemoves all elements from the stack
What does the peek (or top) operation on a stack do?
In a singly linked list, each node contains:
What is a directed graph?
What is the time complexity of searching for a key in a balanced binary search tree?
The keys 50, 30, 70, 20, 40 are inserted in this order into an empty binary search tree. What is the left child of 30?
An application needs fast lookups and also needs to list keys in sorted order and answer range queries. Which structure fits best?
How long does it take to search for an arbitrary key in a binary min-heap of n elements?
For a hash table to work correctly, which rule must hash and equality follow?
Full step-by-step solutions: practise this topic on examproblems.com.