retagged by
274 views
0 votes
0 votes

A linked list stores the numbers in sorted order.

What will be the contents of a list after the following insert & delete operations are performed?
 

insert(4)
insert(2)
insert(9)
delete(2)
insert(7)
insert(5)
delete(7)
insert(72)
  1.     $4$  $9$   $5$  $72$
  2.     $4$  $5$  $7$   $72$
  3.     $4$  $5$  $9$   $72$  
  4.     $4$  $5$  $7$   $9$
retagged by

1 Answer

Best answer
0 votes
0 votes
It is Linked List

operation  Linked list

insert(4)      4
insert(2)      2-->4
insert(9)      2-->4-->9
delete(2)      4-->9
insert(7)       4-->7-->9
insert(5)       4-->5-->7-->9
delete(7)       4-->5--->9
insert(72)       4-->5--->9-->72

Which is option C .
Answer:

Related questions

0 votes
0 votes
1 answer
1
1 votes
1 votes
2 answers
2
Bikram asked Feb 9, 2017
320 views
A ternary tree is a tree in which every internal node has exactly three children.The number of leaves in a ternary tree with $’z’$ internal nodes is _______.$2$$\left...
0 votes
0 votes
1 answer
3
0 votes
0 votes
1 answer
4
Bikram asked Feb 9, 2017
292 views
What feature of heaps allows them to be efficiently implemented using a partially filled array?Heaps are binary search trees.Heaps contain only integer data.Heaps are ful...