Posts

Showing posts with the label Data Structure

Solved MCQ on Searching and Sorting Algorithms in Data Structure set-2

1) The worst case occur in linear search algorithm when ....... A. Item is somewhere in the middle of the array B. Item is not in the array at all C. Item is the last element in the array D. Item is the last element in the array or item is not there at all 2) If the number of records to be sorted is small, then ...... sorting can be efficient. A. Merge B. Heap C. Selection D. Bubble 3) The complexity of sorting algorithm measures the ...... as a function of the number n of items to be sorter. A. average time B. running time C. average-case complexity D. case-complexity 4) Which of the following is not a limitation of binary search algorithm? A. must use a sorted array B. requirement of sorted array is expensive when a lot of insertion and deletions are needed C. there must be a mechanism to access middle element directly D. binary search algorithm is not efficient when the data elements more than 1500. 5) The Average case occurs in linear search algorithm .......... A. when item is som...

MCQ on Searching, Merging and Sorting Methods in Data Structure set-1

1) Finding the location of a given item in a collection of items is called ...... A. Discovering B. Finding C. Searching D. Mining 2) Which of the following is an external sorting? A. Insertion Sort B. Bubble Sort C. Merge Sort D. Tree Sort 3) Very slow way of sorting is .......... A. Insertion sort B. Heap sort C. Bubble sort D. Quick sort 4) Which of the following is an internal sorting? A. Tape Sort B. 2-way Merge Sort C. Merge Sort D. Tree Sort 5) Sorting a file F usually refers to sorting F with respect to a particular key called ..... A. Basic key B. Primary key C. Starting key D. Index key 6) The time complexity of quick sort is ........ A. O(n) B. O(logn) C. O(n2) D. O(n logn) 7) Selection sort first finds the .......... element in the list and put it in the first position. A. Middle element B. Largest element C. Last element D. Smallest element 8) Quick sort is also known as ........ A. merge sort B. tree sort C. shell sort D. partition and exchange sort 9) The operation that ...

Objective Questions on List and Linked List in Data Structure set-2

1) To insert a new node in linked list free node will be available in ........ A. Available list B. Avail list C. Free node list D. Memory space list 2) A singly linked list is also called as ........ A. linked list B. one way chain C. two way chain D. right link 3) A ..... list is a header list where the node points back to the header node. A. Circular header B. Grounded header C. Two way header D. One way header 4) A doubly linked list has .......... pointers with each node. A. 0 B. 1 C. 2 D. 3 5) Header linked lists are frequently used for maintaining ........ in memory. A. Polynomials B. Binomial C. Trinomial D. Quadratic equation 6) The pointer that points to the first node in the list is ........ A. FIRST B. AVAIL C. TOP D. REAR 7) Two-way list may be maintained in memory by means of ............. A. Queues B. Linear arrays C. Non linear arrays D. Stacks 8) A doubly linked list is also called as .......... A. linked list B. one way chain C. two way chain D. right link 9) The list...

Solved MCQ on List and Linked List in Data Structure set-1

1) Linked lists are best suited ..... A. for relatively permanent collections of data. B. for the size of the structure and the data in the structure are constantly changing. C. data structure D. for none of above situation 2) The operation of processing each element in the list is known as ...... A. sorting B. merging C. inserting D. traversal 3) The situation when in a linked list START=NULL is .... A. Underflow B. Overflow C. Houseful D. Saturated 4) Each node in singly linked list has ........ fields. A. 2 B. 3 C. 1 D. 4 5) Which of the following is two way lists? A. Grounded header list B. Circular header list C. Linked list with header and trailer nodes D. List traversed in two directions 6) Which is the pointer associated with the availability list? A. FIRST B. AVAIL C. TOP D. REAR 7) Value of first linked list index is .... A. 0 B. 1 C. -1 D. 2 8) In linked lists there are no NULL links in A. single linked list B. linear doubly linked list C. circular linked list D. linked list...

Objective Questions on Tree and Graph in Data Structure set-2

1) The post order traversal of binary tree is DEBFCA. Find out the pre order traversal. A. ABFCDE B. ADBFEC C. ABDECF D. ABDCEF 2) While converting binary tree into extended binary tree, all the original nodes in binary tree are ....... A. Internal nodes on extended tree B. External nodes on extended tree C. Vanished on extended tree D. Intermediate nodes on extended tree 3) The in-order traversal of tree will yield a sorted listing of elements of tree in ........ A. binary trees B. binary search trees C. heaps D. binary heaps 4) In a binary tree, certain null entries are replaced by special pointers which point to nodes higher in the tree for efficiency. These special pointers are called ......... A. Leaf B. Branch C. Path D. Thread 5) In a head tree ..... A. values in a node is greater than every value every value in left sub tree and smaller than right sub tree. B. values in a node is greater than every value in children of it. C. conditions. D. terms. 6) The in order traversal of t...

Solved MCQ on Tree and Graph in Data Structure set-1

1) The operation of processing each element in the list is known as ...... A. sorting B. merging C. inserting D. traversal 2) Other name for directed graph is .......... A. Direct graph B. Digraph C. Dir-graph D. Digraph 3) Binary trees with threads are called as ....... A. Threaded trees B. Pointer trees C. Special trees D. Special pointer trees 4) Graph G is .............. if for any pair u, v of nodes in G there is a path from u to v or path from v to u. A. Leterally connected B. Widely Connected C. Unliterally connected D. Literally connected 5) In Binary trees nodes with no successor are called ...... A. End nodes B. Terminal nodes C. Final nodes D. Last nodes 6) A connected graph T without any cycles is called ........ A. free graph B. no cycle graph C. non cycle graph D. circular graph 7) Trees are said .......... if they are similar and have same contents at corresponding nodes. A. Duplicate B. Carbon copy C. Replica D. Copies 8) A connected graph T without any cycles is called...

Solved MCQ on Stack and Queue in Data Structure set-1

1) ......... form of access is used to add and remove nodes from a queue. A. LIFO, Last In First Out B. FIFO, First In First Out C. Both a and b D. None of these 2) In liked representation of stack ....... holds the elements of the stack. A. INFO fields B. TOP fields C. LINK fields D. NULL fields 3) ........ form of access is used to add remove nodes from a stack. A. LIFO B. FIFO C. Both A and B D. None of these 4) In the linked representation of the stack ......... behaves as the top pointer variable of stack. A. Stop pointer B. Begin pointer C. Start pointer D. Avail pointer 5) New nodes are added to the ......... of the queue. A. Front B. Back C. Middle D. Both A and B 6) In linked representation of stack the null pointer of the last node in the list signals .......... A. Beginning of the stack B. Bottom of the stack C. Middle of the stack D. In between some value 7) What happens when you push a new node onto a stack? A. The new node is placed at the front of the linked list B. The ...

Objective Questions of Data Structure with Answer set-6

1. .......................... is a variable that can hold the address of the variables, structure and functions that are used in the program. A) Array B) Pointer C) Structure D) None of the above 2. .................. is the organization of the data in a computers memory or in a file. A) Array B) Data Structure C) Data Management D) Data Organization 3. Which of the following is/are the advantages of using an array? i) Multi huge quantity of data items can be stored. ii) Arrays saves the memory space iii) Arrays helps to arrange the data items in particular order. iv) Data item searching is faster. A) i, ii and iii only B) ii, iii and iv only C) i, iii and iv only D) All i, ii, iii and iv 4. Some examples of data structures are i) array ii) stack iii) queue iv) binary tree v) hybrid tree A) i, ii, iii and iv only B) ii, iii, iv and v only C) i, ii, iii and v only D) All i, ii, iii, iv and v 5. Match the following components of data structure based on the concept of Abstract Data Type ...

MCQ of Data Structure and Algorithm with Answer set-5

Image
1. Arrays are best data structures A) for relatively permanent collections of data B) for the size of the structure and the data in the structure are constantly changing C) for both of above situation A Linked List data structure that starts with a head reference to the first node, and each node contains a 'next' field that points to the next node. The final node has a 'next' value of null. (Photo credit: Wikipedia ) D) for none of above situation 2. Which of the following data structure is not linear data structure? A) Arrays B) Linked lists C) Both of the above D) None of the above 3. The disadvantage in using a circular linked list is ......................... A) It is possible to get into infinite loop. B) Last node points to first node. C) Time consuming D) Requires more memory space 4. A linear list in which each node has pointers to point to the predecessor and successors nodes is called as .. A) Singly Linked List B) Circular Linked List C) Doubly Linked List D...

Solved MCQ of Data Structure and Algorithm set-4

Image
Tree-data-structure (Photo credit: Wikipedia ) 1. Which of the following data structure is non-linear type? A) Strings B) Lists C) Stacks D) Tree 2. Which of the following data structure is linear type? A) Array B) Tree C) Graphs D) Hierarchy 3. The logical or mathematical model of a particular organization of data is called a ......... A) Data structure B) Data arrangement C) Data configuration D) Data formation 4. The simplest type of data structure is .................. A) Multidimensional array B) Linear array C) Two dimensional array D) Three dimensional array 5. Linear arrays are also called ................... A) Straight line array B) One-dimensional array C) Vertical array D) Horizontal array 6. Arrays are best data structures ............ A) For relatively permanent collections of data. B) For the size of the structure and the data in the structure are constantly changing C) For both of above situation D) For none of the above 7. Which of the following data structures are in...