Data structure MCQ Quiz Hub

Data Structure and Algorithms (DSA) set 5

Choose a topic to test your knowledge and improve your Data structure skills

Accessing time of nth node in a linked list is______





✅ Correct Answer: 1

An array is referenced by its name.Similarly,a linked list is referenced by____





✅ Correct Answer: 1

Time required to search an element in a linked list is____





✅ Correct Answer: 1

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





✅ Correct Answer: 3

In a circularly linked list organisation ,insertion of a record involves the modifications of





✅ Correct Answer: 3

What is true about linked kist?





✅ Correct Answer: 1

A node of linked list contains_______





✅ Correct Answer: 3

Deletion in a linked list requeries modification of______pointers





✅ Correct Answer: 1

Select the set of instructions to insert a node pointed by q after a node pointed by p





✅ Correct Answer: 1

select the set of operations to insert a node pointed by q at the beginning of the linked list





✅ Correct Answer: 1

Select the set of operations to delete the first node from a linked list





✅ Correct Answer: 1

Select the correct looping condition for positioning apointer p on the second last in a linked list.Assume p=head,initially.





✅ Correct Answer: 1

If address of the 8th element in a linked list of integers is1022,then address of the 9th element is





✅ Correct Answer: 4

The advantages of linked list over an array for representing a list is________





✅ Correct Answer: 4

The address returned by malloc()is type casted because





✅ Correct Answer: 2

Which function returns a void pointers?





✅ Correct Answer: 3

Select the correct statement





✅ Correct Answer: 3

The____linked list can be processed in either direction.





✅ Correct Answer: 3

A polynominal in single variable should be handled using__





✅ Correct Answer: 4

A node of doubly linked contains





✅ Correct Answer: 3

Each node in a linear list contains an item called____which points to the next node in the list.





✅ Correct Answer: 2

Which is not dynamic memory allocation function?





✅ Correct Answer: 3

The function that allocates requested size of bytes and returns a pointer to the first byte of the allocated space is





✅ Correct Answer: 2

NULL link is not present in…





✅ Correct Answer: 3

In a circular linked list





✅ Correct Answer: 2

A linear collection of data elements where the linear node is given by means of pointer is called?





✅ Correct Answer: 1

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





✅ Correct Answer: 1

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 list ii) Insertion at the end of the linked list iii) Deletion of the front node of the linked list iv) Deletion of the last node of the linked lis





✅ Correct Answer: 3

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 list ii) Insertion at the end of the linked list iii) Deletion of the front node of the linked list iv) Deletion of the end node of the linked list





✅ Correct Answer: 4

In linked list each node contain minimum of two fields. One field is data field to store the data second field is?





✅ Correct Answer: 3

What would be the asymptotic time complexity to add an element in the linked list?





✅ Correct Answer: 4

What would be the asymptotic time complexity to insert an element at the second position in the linked list?





✅ Correct Answer: 2

The concatenation of two list can performed in O(1) time. Which of the following variation of linked list can be used?





✅ Correct Answer: 3

Consider the following definition in c programming language struct node { int data; struct node * next; } typedef struct node NODE; NODE *ptr; Which of the following c code is used to create new node?





✅ Correct Answer: 1

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





✅ Correct Answer: 3

In doubly linked lists, traversal can be performed?





✅ Correct Answer: 3

What kind of linked list is best to answer question like “What is the item at position n?”





✅ Correct Answer: 4

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?





✅ Correct Answer: 3

A variant of the linked list in which none of the node contains NULL pointer is?





✅ Correct Answer: 3

In circular linked list, insertion of node requires modification of?





✅ Correct Answer: 2

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





✅ Correct Answer: 2

Linked lists are not suitable to for the implementation of?





✅ Correct Answer: 4

In worst case, the number of comparison need to search a singly linked list of length n for a given element is





✅ Correct Answer: 4

consider the function f defined here: struct item { int data; struct item * next; }; int f (struct item *p) { return((p==NULL) ||((p->next==NULL)||(p->data<=p->next->data) && (p->next))); } For a given linked list p, the function f returns 1 if and only if





✅ Correct Answer: 2

Finite sequence S of Zero or more chatacters is called_____





✅ Correct Answer: 3

String with zero characters is called____string





✅ Correct Answer: 1

Groups of consecutive element in a string.Such as words,phrase and sentences are called___





✅ Correct Answer: 2

_____operation of word processing invovles replacing one string in the text by another.





✅ Correct Answer: 4

___is the problem of deciding whether or not a given string problem p appears in a text T.





✅ Correct Answer: 1

If string1=john,and string2=Rivers are merged,the process is called





✅ Correct Answer: 3

__is a variable whose length may vary during the execution of a program.





✅ Correct Answer: 1

NurseryLand.Nursery.Students = 10;





✅ Correct Answer: 3

If a function is declared as void fn(int *p), then which of the following statements is valid to call function fn?





✅ Correct Answer: 2

To declare an array S that holds a 5-character string, you would write





✅ Correct Answer: 1

The constructed datatype in C is known as





✅ Correct Answer: 3

A structure definition is called as





✅ Correct Answer: 1

If a, b and c are integer variables with the values a=8, b=3 and c=-5. Then what is the value of the arithmetic expression: 2 * b + 3 * (a-c)





✅ Correct Answer: 1

A global variable is a variable





✅ Correct Answer: 3

main ( ) is an example of





✅ Correct Answer: 1

While incrementing a pointer, its value gets increased by the length of the data type to which it points. This length is called





✅ Correct Answer: 1

a->b is systematically correct if_____





✅ Correct Answer: 1

Which of the following best describes sorting ?





✅ Correct Answer: 3

A function which calls itself is called as





✅ Correct Answer: 3

Where do we use the operator -> ?





✅ Correct Answer: 4

In selection sort of n elements,how many times is the swap function called in the complete execution of the algorithm?





✅ Correct Answer: 2

. a->b is systematically correct if_____





✅ Correct Answer: 1

Literal means





✅ Correct Answer: 2

Each data item in a record may be a groupitem composed of sub-items; those items which are indecomposable are called





✅ Correct Answer: 4

Binary search algorithm cannot be applied to





✅ Correct Answer: 4

When new data are to be inserted into a data structure, but there is no available space; this situation is usually called





✅ Correct Answer: 4

The following is two-way list





✅ Correct Answer: 4

In a binary tree, certain null entries are re-placed by special pointers which point to nodes higher in tree for efficiency. These special pointers are called





✅ Correct Answer: 4

In a graph if e=(u, v) means





✅ Correct Answer: 3

If every node u in G is adjacent to every other node v in G, A graph is said to be





✅ Correct Answer: 2

The Worst case occur in linear search algo- rithm when





✅ Correct Answer: 4

The Average case occur in linear search al- gorithm





✅ Correct Answer: 1

The complexity of the average case of analgorithm is





✅ Correct Answer: 1

The following data structure allows deleting data elements from front and inserting at rear





✅ Correct Answer: 1

This data structure allows deletions at both ends of the list but insertion at only one end.





✅ Correct Answer: 1

The following data structure is non-linear type





✅ Correct Answer: 4

he following data structure is linear type





✅ Correct Answer: 4

To represent hierarchical relationship be- tween elements, the following data structure is not suitable





✅ Correct Answer: 3

A binary tree whose every node has either zero or two children is called





✅ Correct Answer: 3

The complexity of Binary search algorithm is





✅ Correct Answer: 2

The complexity of Bubble sort algorithm is





✅ Correct Answer: 2