In Data Structures, which of the following is the tightest upper-bound that represents the time complexity of inserting an object into a binary search tree of n nodes?
In Data Structures, a circular queue with n–1 elements is implemented with an array of n elements. The insertion and deletion operations are carried out using REAR and FRONT as array index variables.
If REAR = FRONT = 0 initially, then which of the following conditions is true for the two extreme states of the queue?
The five items: A, B, C, D and E are pushed into a stack, one after the other starting from A. The stack is popped four times and each element is inserted into a queue, after which, two elements are deleted from the queue and pushed back into the stack. Now, one item is popped from the stack.
Which item is popped?