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

1. Accessing time of nth node in a linked list is______




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




3. Time required to search an element in a linked list is____




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




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




6. What is true about linked kist?




7. A node of linked list contains_______




8. Deletion in a linked list requeries modification of______pointers




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




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




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




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




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




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




15. The address returned by malloc()is type casted because




16. Which function returns a void pointers?




17. Select the correct statement




18. The____linked list can be processed in either direction.




19. A polynominal in single variable should be handled using__




20. A node of doubly linked contains




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




22. Which is not dynamic memory allocation function?




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




24. NULL link is not present in…




25. In a circular linked list




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




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




28. 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




29. 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




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




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




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




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




34. 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?




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




36. In doubly linked lists, traversal can be performed?




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




38. 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?




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




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




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




42. Linked lists are not suitable to for the implementation of?




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




44. 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




45. Finite sequence S of Zero or more chatacters is called_____




46. String with zero characters is called____string




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




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




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




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




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




52. NurseryLand.Nursery.Students = 10;




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




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




55. The constructed datatype in C is known as




56. A structure definition is called as




57. 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)




58. A global variable is a variable




59. main ( ) is an example of




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




61. a->b is systematically correct if_____




62. Which of the following best describes sorting ?




63. A function which calls itself is called as




64. Where do we use the operator -> ?




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




66. . a->b is systematically correct if_____




67. Literal means




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




69. Binary search algorithm cannot be applied to




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




71. The following is two-way list




72. 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




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




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




75. The Worst case occur in linear search algo- rithm when




76. The Average case occur in linear search al- gorithm




77. The complexity of the average case of analgorithm is




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




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




80. The following data structure is non-linear type




81. he following data structure is linear type




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




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




84. The complexity of Binary search algorithm is




85. The complexity of Bubble sort algorithm is