search
Log In
0 votes
116 views

Let P be a singly linked list. Let Q be the pointer to an intermediate node X in the list. What is the worst case time complexity of the best known algorithm to delete node X from the list?

A) O(n)

B) O(log n)

C) O(log n)

D) O(1)

closed as a duplicate of: GATE2004-IT-13
in DS
closed by
116 views

Related questions

0 votes
0 answers
1
126 views
IN a binary tree, the number of internal nodes of degree one is 5 and the number of internal nodes of degree 2 is 10. The number of leaf nodes in the binary tree is A) 15 B) 11 C) 12 D) 10
asked Oct 27, 2016 in DS Sankaranarayanan P.N 126 views
0 votes
0 answers
2
143 views
The maximum number of edges in an acyclic undirected graph with n vertices A) n - 1 B) n C) n +1 D) 2n -1
asked Oct 27, 2016 in DS Sankaranarayanan P.N 143 views
0 votes
0 answers
3
112 views
Let G be a weighted undirected graph and e be an edge with mazimum weight in G. suppose there is a minimum weight spanning tree in G containing edge e. which of the following statements are always true? A) There exists a cutset in G having all edges of maximum weight B) ... in G having all edges of maximum weight C) Edge e cannot be contained in a cycle D) All edges in G have the same weight
asked Oct 27, 2016 in DS Sankaranarayanan P.N 112 views
1 vote
0 answers
4
102 views
A binary search tree contains the numbers 1, 2, 3, 4, 5, 6, 7, 8. The tree is traversed in pre-order and the values of in each node printed out the sequence of values obtained is 5,3,1,2,4,6,8,7. If the tree is traversed in post order, the sequence obtained would be A) 8 7 6 5 4 3 2 1 B) 1 2 3 4 8 7 6 5 C) 2 1 4 3 6 7 8 5 D) 2 1 4 3 7 8 6 5
asked Oct 27, 2016 in DS Sankaranarayanan P.N 102 views
...