Recent questions tagged linked-list

1 1 vote
2 2 answers
1.1k
1.1k views
Delete the duplicate nodeDelete the alternate duplicate nodeDelete the adjacent nodeNone of these
2 2 votes
3 answers 3 answers
1.5k
1.5k views
1 1 vote
1 answers 1 answer
1.9k
1.9k views
In circular linked list, insertion of a node at the end involves pointer modification:(A) one(B) two(C) three(D) none
2 2 votes
5 answers 5 answers
23.6k
23.6k views
The minimum number of fields with each node of doubly linked list is1234
1 1 vote
2 answers 2 answers
9.5k
9.5k views
39 39 votes
2 answers 2 answers
13.6k
13.6k views
The following C function takes a singly-linked list of integers as a parameter and rearranges the elements of the list. The list is represented as pointer to a structure....
83 83 votes
9 answers 9 answers
40.1k
40.1k 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 del...
52 52 votes
7 answers 7 answers
24.5k
24.5k views
Consider the following statements:First-in-first out types of computations are efficiently supported by STACKS.Implementing LISTS on linked lists is more efficient than i...
38 38 votes
3 answers 3 answers
16.6k
16.6k views
Which of the following statements is true?As the number of entries in a hash table increases, the number of collisions increases.Recursive programs are efficientThe worst...
49 49 votes
5 answers 5 answers
30.3k
30.3k views
Linked lists are not suitable data structures for which one of the following problems?Insertion sortBinary searchRadix sortPolynomial manipulation
63 63 votes
4 answers 4 answers
18.1k
18.1k views
The following C function takes a singly-linked list as input argument. It modifies the list by moving the last element to the front of the list and returns the modified l...
22 22 votes
6 answers 6 answers
6.4k
6.4k views
Consider a singly linked list having $n$ nodes. The data items $d_1, d_2, \dots d_n$ are stored in these $n$ nodes. Let $X$ be a pointer to the $j^{\text{th}}$ node $(1 \...
38 38 votes
3 answers 3 answers
8.1k
8.1k views
Consider the following piece of 'C' code fragment that removes duplicates from an ordered list of integers.Node *remove-duplicates (Node* head, int *j) { Node *t1, *t2; ...
60 60 votes
8 answers 8 answers
28.4k
28.4k views
The concatenation of two lists is to be performed on $O(1)$ time. Which of the following implementations of a list should be used?Singly linked listDoubly linked listCirc...
38 38 votes
5 answers 5 answers
11.6k
11.6k views
Let $p$ be a pointer as shown in the figure in a single linked list. What do the following assignment state...
95 95 votes
6 answers 6 answers
29.2k
29.2k views
Suppose each set is represented as a linked list with elements in arbitrary order. Which of the operations among $\text{union, intersection, membership, cardinality}$ wil...
81 81 votes
13 answers 13 answers
47.1k
47.1k views
A circularly linked list is used to represent a Queue. A single variable $p$ is used to access the Queue. To which node should $p$ point such that both the operations $\t...
80 80 votes
10 answers 10 answers
31.4k
31.4k views
Consider the function $f$ defined below.struct item { int data; struct item * next; }; int f(struct item *p) { return ((p == NULL) || (p->next == NULL)|| ((p->data <= p -...
34 34 votes
8 answers 8 answers
21.7k
21.7k views
In the worst case, the number of comparisons needed to search a single linked list of length $n$ for a given element is$\log n$$\frac{n}{2}$$\log_2 {n} - 1$$n$
57 57 votes
7 answers 7 answers
27.3k
27.3k views
The following C function takes a single-linked list of integers as a parameter and rearranges the elements of the list. The function is called with the list containing th...