recategorized by
4,931 views

2 Answers

Best answer
3 votes
3 votes
Operation push(1) push(2) pop push(3) push(4) pop pop push(5) pop
          4        
    2   3 3 3   5  
  1 1 1 1 1 1 1 1 1

Hence,Option(D)1 is the correct choice.

selected by
2 votes
2 votes

Answer: 1

Push 1    Push 2

 1    Pop 2

1     Push 3    Push 4 

1     Pop 4     Pop 3

1     Push 5  

1     Pop 5

1    <=== Answer

Answer:

Related questions

0 votes
0 votes
1 answer
1
go_editor asked Jul 10, 2016
8,079 views
A hash function $f$ defined as $f (key) = key \mod 13$, with linear probing is used to insert keys 55, 58, 68, 91, 27, 145. What will be the location of 79?1234
3 votes
3 votes
2 answers
2
go_editor asked Jul 8, 2016
6,733 views
In which tree, for every node the height of its left subtree and right subtree differ almost by 1?Binary Search TreeAVL TreeThreaded Binary TreeComplete Binary Tree
2 votes
2 votes
1 answer
3
im.raj asked Jun 16, 2016
5,417 views
The worst case time complexity of AVL is tree is better in comparison to binary search tree forSearch and Insert OperationsSearch and Delete OperationsInsert and Delete O...
4 votes
4 votes
2 answers
4
go_editor asked Jul 11, 2016
4,457 views
The maximum number of keys stored in a B-tree of order $m$ and depth $d$ is$m^{d +1}-1$$\frac{m^{d+1}-1}{m-1}$$(m-1)(m^{d+1}-1)$$\frac{m^d-1}{m-1}$