NEW
Font size
WorksheetsPython_DS2
Total questions: 10
Worksheet time: 5mins
Which of this not about linked list ?
A nonlinear collection of data elements
It can be used to implement several other common abstract data types example stack, queue, tree
It use more memory than arrays because of the storage used by their pointers.
Each record of a linked list is often called an 'element' or 'node'
Which the following circular linked list
What advantage does a linked list have over an array?
A linked list can give you the data faster
It is easier to use
A linked list is not of a fixed size
It's better
What is the best and worst-case time complexity for searching for a value in a Linked List?
O(1) and O(log n)
O(1) and O(1)
O(1) and O(n^2)
O(1) and O(n)
Nodes in a linked list contain two things
Direction and a pointer
Data and a pointer
A Pointer and a reference
A pointer and a node
What is an advantage of using a linked list over an array?
Size of the list doesn't need to be mentioned at the beginning of the program
You can add or remove elements from the middle of the list.
The linked list doesn't have a size limit,
Both of these are true.
How to delete node B
head->next=TempPtr; delete TemPtr;
delete TempPtr; head->next=TempPtr->next;
head->next=TempPtr->next; delete TempPtr;
delete head; head->next= TempPtr->next
To display data of the linked list:
LinkedList *ptr; while (ptr!=NULL){ cout<<ptr->data;}
LinkedList *ptr; while(ptr!=NULL){ ptr=ptr->Next;cout<<ptr->Data};
LinkedList *ptr; while(ptr!=NULL){ ptr=ptr->Next;}
LinkedList *ptr; while(ptr!=NULL){ ptr=ptr->Next;cout<<ptr->Next;}
Linked List is a data structure that consists of sequence of nodes
True
False
What does the following function do for a given Linked List with first node as head?
Prints all nodes of linked lists
Prints alternate nodes of Linked List
Prints alternate nodes in reverse order
Prints all nodes of linked list in reverse order
