Skip to content

Tag Archives: Data Structures-Linked List

Suppose each set is represented as a linked list with elements in arbitrary order. Which of the operations among union, intersection, membership, cardinality will be… Read More
In the worst case, the number of comparisons needed to search a singly linked list of length n for a given element is (GATE CS… Read More
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… Read More
The following C function takes a simply-linked list as input argument. It modifies the list by moving the last element to the front of the… Read More
What is the output of following function for start pointing to first node of following linked list? 1->2->3->4->5->6 void fun(struct node* start) {   if(start ==… Read More
The following function reverse() is supposed to reverse a singly linked list. There is one line missing at the end of the function. /* Link… Read More
Which of the following sorting algorithms can be used to sort a random linked list with minimum time complexity? (A) Insertion Sort (B) Quick Sort… Read More
Consider the following function that takes reference to head of a Doubly Linked List as parameter. Assume that a node of doubly linked list has… Read More
Which of the following points is/are true about Linked List data structure when it is compared with array (A) Arrays have better cache locality that… Read More
What does the following function do for a given Linked List with first node as head? void fun1(struct node* head) { if(head == NULL) return;… Read More