if you want to remove an article from website contact us from top.

    which of the following statements about linked list data structure is/are true?

    Mohammed

    Guys, does anyone know the answer?

    get which of the following statements about linked list data structure is/are true? from screen.

    Which of the following points is/are true about Linked List data structure when it is compared with array

    Click here👆to get an answer to your question ✍️ Which of the following points is/are true about Linked List data structure when it is compared with array

    Question

    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 can make them better in terms of performance

    B

    It is easy to insert and delete elements in Linked List

    C

    Random access is not allowed in a typical implementation of Linked Lists

    D

    All of the mentioned

    Medium

    स्रोत : www.toppr.com

    [Solved] Which of the following statements about linked list data structure is/are TRUE?

    Q.

    Which of the following statements about linked list data structure is/are TRUE?

    A. addition and deletion of an item to/ from the linked list require modification of the existing pointers

    B. the linked list pointers do not provide an efficient way to search an item in the linked list

    C. linked list pointers always maintain the list in ascending order

    D. the linked list data structure provides an efficient way to find kth element in the list

    Answer» B. the linked list pointers do not provide an efficient way to search an item in the linked list

    Report View more MCQs in

    » Data Structure and Algorithms (DSA) solved mcqs

    Related questions

    Consider an implementation of unsorted singly linked list. Suppose it has its representation with a head pointer only. Given the representation, which of the following operation can be implemented in O(1) time?i) Insertion at the front of the linked listii) Insertion at the end of the linked listiii) Deletion of the front node of the linked listiv) Deletion of the last node of the linked list

    Consider an implementation of unsorted doubly linked list. Suppose it has its representation with a head pointer and tail pointer. Given the representation, which of the following operation can be implemented in O(1) time?i) Insertion at the front of the linked listii) Insertion at the end of the linked listiii) Deletion of the front node of the linked listiv) Deletion of the end node of the linked list

    Consider an implementation of unsorted singly linked list. Suppose it has its representation with a head and tail pointer. Given the representation, which of the following operation can be implemented in O(1) time? i) Insertion at the front of the linked listii) Insertion at the end of the linked listiii) Deletion of the front node of the linked listiv) Deletion of the last node of the linked lis

    A variation of linked list is circular linked list, in which the last node in the list points to first node of the list. One problem with this type of list is?

    A ________ linked list is a linked list structure in which each node has a pointer to both its successor and predecessor.

    Because of linear structure of linked list having linear ordering,there is similarity between linked list and array in

    Which of the following operations is performed more efficiently by doubly linked list than by singly linked list?

    A ________ linked list is a linked list which always contains a special node, called the header node.

    Searching of linked list requires linked list to be created

    A variant of linked list in which last node of the list points to the first node of the list is?

    स्रोत : mcqmate.com

    Linked List Data Structure

    Quiz or mock test on Linked List Data Structure. The quiz contains multiple choice questions for technical interview and GATE preparation

    Linked List

    Last Updated : 29 Sep, 2020

    1 2 3 4 Question 1

    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; fun1(head->next);

    printf("%d ", head->data);

    } A

    Prints all nodes of linked lists

    B

    Prints all nodes of linked list in reverse order

    C

    Prints alternate nodes of Linked List

    D

    Prints alternate nodes in reverse order

    Linked List    Discuss it

    Question 2

    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 can make them better in terms of performance.

    B

    It is easy to insert and delete elements in Linked List

    C

    Random access is not allowed in a typical implementation of Linked Lists

    D

    The size of array has to be pre-decided, linked lists can change their size any time.

    E All of the above

    Linked List    Discuss it

    Question 3

    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 previous pointer as prev and next pointer as next.

    void fun(struct node **head_ref)

    {

    struct node *temp = NULL;

    struct node *current = *head_ref;

    while (current !=  NULL)

    {

    temp = current->prev;

    current->prev = current->next;

    current->next = temp;

    current = current->prev;

    } if(temp != NULL )

    *head_ref = temp->prev;

    }

    Assume that reference of head of following doubly linked list is passed to above function 1 <--> 2 <--> 3 <--> 4 <--> 5 <-->6. What should be the modified linked list after the function call?

    A

    2 <--> 1 <--> 4 <--> 3 <--> 6 <-->5

    B

    5 <--> 4 <--> 3 <--> 2 <--> 1 <-->6.

    C

    6 <--> 5 <--> 4 <--> 3 <--> 2 <--> 1.

    D

    6 <--> 5 <--> 4 <--> 3 <--> 1 <--> 2

    Linked List    Discuss it

    Question 4

    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 C Heap Sort D Merge Sort

    Linked List    50 Data Structures MCQs with Answers    Discuss it

    Question 5

    The following function reverse() is supposed to reverse a singly linked list. There is one line missing at the end of the function.

    /* Link list node */

    struct node { int data; struct node* next; };

    /* head_ref is a double pointer which points to head (or start) pointer

    of linked list */

    static void reverse(struct node** head_ref)

    {

    struct node* prev   = NULL;

    struct node* current = *head_ref;

    struct node* next;

    while (current != NULL)

    {

    next  = current->next;

    current->next = prev;

    prev = current; current = next; }

    /*ADD A STATEMENT HERE*/

    }

    What should be added in place of "/*ADD A STATEMENT HERE*/", so that the function correctly reverses a linked list.

    A *head_ref = prev; B

    *head_ref = current;

    C *head_ref = next; D *head_ref = NULL;

    Linked List    Discuss it

    Question 6

    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 == NULL) return;

    printf("%d  ", start->data);

    if(start->next != NULL )

    fun(start->next->next);

    printf("%d  ", start->data);

    } A 1 4 6 6 4 1 B 1 3 5 1 3 5 C 1 2 3 5 D 1 3 5 5 3 1

    Linked List    Discuss it

    Question 7

    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 list and returns the modified list. Some part of the code is left blank. Choose the correct alternative to replace the blank line.

    typedef struct node { int value; struct node *next; }Node;

    Node *move_to_front(Node *head)

    { Node *p, *q;

    if ((head == NULL: || (head->next == NULL))

    return head; q = NULL; p = head;

    while (p-> next !=NULL)

    { q = p; p = p->next; }

    _______________________________

    return head; } A

    q = NULL; p->next = head; head = p;

    B

    q->next = NULL; head = p; p->next = head;

    C

    head = p; p->next = q; q->next = NULL;

    D

    q->next = NULL; p->next = head; head = p;

    Linked List    Discuss it

    Question 8

    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 the integers 1, 2, 3, 4, 5, 6, 7 in the given order. What will be the contents of the list after the function completes execution?

    struct node { int value; struct node *next; };

    void rearrange(struct node *list)

    {

    struct node *p, * q;

    int temp;

    if ((!list) || !list->next)

    return; p = list; q = list->next; while(q)

    स्रोत : www.geeksforgeeks.org

    Do you want to see answer or more ?
    Mohammed 7 month ago
    4

    Guys, does anyone know the answer?

    Click For Answer