gs gs121 Types of Lists - Triply Linked List - Quiz No.1
gs gs121 Data Structures and Algorithms Quiz
This quiz belongs to book/course code gs gs121 Data Structures and Algorithms of gs organization. We have 169 quizzes available related to the book/course Data Structures and Algorithms. This quiz has a total of 9 multiple choice questions (MCQs) to prepare and belongs to topic Types of Lists. NVAEducation wants its users to help them learn in an easy way. For that purpose, you are free to prepare online MCQs and quizzes.
NVAEducation also facilitates users to contribute in online competitions with other students to make a challenging situation to learn in a creative way. You can create one to one, and group competition on an topic of a book/course code. Also on NVAEducation you can get certifications by passing the online quiz test.
struct node { int data; struct node *previous; struct node *top; };
struct node { int data; struct node *next; struct node *top; };
struct node { int data; struct node *next; struct node *previous; struct node *top; };
struct node { int data; struct node *next; struct node *previous; };
insertelement(data) { create a node with given data. if the linked list is empty { _____________ _____________ } if the given node is less than the head { link the nodes through address and adjust the tail } if the given node is not less than the head { if the given node is equal to the head { new node is inserted on top of the head } else { traverse the linked list to find an element greater than the node and insert in front of the node } } }
Which of the following option is best suited to fill the blank?
initializing previous, next and top pointers to null pointing the head and tail to the node created
pointing previous, next and top pointers to the node created initializing the head and tail to null
initializing previous, next and top pointers to null initializing the head and tail to null
pointing previous, next and top pointers to the node