Data Structure and Alogrithm MCQs

Data Structure and Alogrithm MCQs

Data Structure and Alogrithm MCQs

  1. How can we describe an array in the best possible way?
  2. (a) The Array shows a hierarchical structure.
    (b) Arrays are immutable.
    (c) Container that stores the elements of similar types
    (d) The Array is not a data structure

    (c) Container that stores the elements of similar types

  3. The worst-case occur in linear search algorithm when ..
  4. (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

    (d) Item is the last element in the array or item is not there

  5. The complexity of the sorting algorithm measures the.. as a function of the number n of items to be sorter.
  6. (a) Average time
    (b) Running time
    (c) Average-case complexity
    (d) Case-complexity

    (b) Running time

  7. The Time complexity of bubble sort algorithm is ..
  8. (a) O(n)
    (b) o(logn)
    (c) O(n2)
    (d) O(n logn)

    (c) O(n2)

  9. Partition and exchange sort is ...
  10. (a) Quick sort
    (b) heap heap sort
    (c) bubble sort
    (d) None

    (a) Quick sort

  11. To represent hierarchical relationship between elements, Which data structure is suitable?
  12. (a) Tree
    (b) Graph
    (c) Stack
    (d) Queue

    (a) Tree

  13. The way in which the data item or items are logically related defines..
  14. (a) storage structure
    (b) data structure
    (c) data relationship
    (d) data operation

    (b) data structure

  15. Which of the following can be used as a criterion for classification of data structures used in language processing?
  16. (a) nature of a data structure
    (b) purpose of a data structure
    (c) lifetime of a data structure
    (d) All of the above

    (d) All of the above

  17. What is the process of finding the location of a given data element in the data structure called?
  18. (a) Deletion
    (b) Insertion
    (c) Traversing
    (d) Searching

    (d) Searching

  19. What plays an important role in programming?
  20. (a) Data
    (b) Computer
    (c) Frameowrk
    (d) None of the Above

    (a) Data

  21. Which of the following is a stable sorting algorithm?
  22. (a) Merge Sort
    (b) Quick Sort
    (c) Heap Sort
    (d) Selection Sort

    (a) Merge Sort

  23. How do you initialize an array in C?
  24. (a) int int arr[3] = (1,2,3);
    (b) int arr(3) = {1,2,3);
    (c) int arr[3] = {1,2,3};
    (d) int arr(3) = (1,2,3);

    (c) int arr[3] = {1,2,3};

  25. Which of the following recursive formula can be used to find the factorial of a number?
  26. (a) fact(n) = n * fact(n)
    (b) fact(n) = n * fact(n+1)
    (c) fact(n) = n * fact(n-1)
    (d) fact(n) = n * fact(1)

    (c) fact(n) = n * fact(n-1)

  27. Is following sequence is a fibonacci sequence:0, 1, 1, 2, 3, 5, 8, 13, 21,.
  28. (a) True
    (b) False

    (a) True

  29. Before sorting & After sorting location of element is same. This concept is called as
  30. (a) Sort Stability
    (b) Sort Selection
    (c) Sorting
    (d) None of the above

    (a) Sort Stability

  31. Perform based criteria of algorithm, which has to do with computing algorithm called as _________.
  32. (a) Space Complexity
    (b) Time Complexity
    (c) Notations
    (d) Subtitles/closed captic

    (b) Time Complexity

  33. Worst case measured by
  34. (a) Big Oh Notation
    (b) Omega Notation
    (c) Theta Notation
    (d) None

    (a) Big Oh Notation

  35. Which of the following is non-liner data structure ?
  36. (a) Trees
    (b) Stack
    (c) List
    (d) Queue

    (a) Trees

  37. Which of the following is not the required condition for binary search algorithm?
  38. (a) The list must be sorted
    (b) There should be the direct access to the middle element in any sublist
    (c) Divide conquare is used
    (d) Search sequentially

    (d) Search sequentially

  39. Binary Search can be categorized into which of the following?
  40. (a) Brute Force technique
    (b) Divide and conquer
    (c) Greedy algorithm
    (d) Dynamic programming

    (b) Divide and conquer

  41. What is the time complexity of binary search with iteration?
  42. (a) O(nlogn)
    (b) O(logn)
    (c) o(n)
    (d) O(n2)

    (b) O(logn)

  43. The element that is going to be searched in a list is called
  44. (a) items
    (b) key
    (c) file
    (d) table

    (b) key

  45. In binary search, we compare the value with the elements in the. position of the array.*
  46. (a) Left
    (b) middle
    (c) Right
    (d) None

    (b) middle

  47. Which is the fastest searching algorithm?
  48. (a) Linear Search
    (b) Binary Search
    (c) Interpolation
    (d) None

    (b) Binary Search

  49. The following sequence is a fibonacci sequence: 0, 1, 1, 2, 3, 5, 8, 13, 21,. Which technique can be used to get the nth fibonacci term?
  50. (a) Switch case
    (b) Recursion
    (c) Functions calling
    (d) Divide & Conquare

    (b) Recursion

  51. What is an internal sorting algorithm?
  52. (a) Algorithm that uses tape or disk during the sort
    (b) Algorithm that uses main memory during the sort
    (c) Algorithm that involves swapping
    (d) Algorithm that are considered 'in place'

    (a) Algorithm that uses tape or disk during the sort

  53. Which of the following real time examples is based on insertion sort?
  54. (a) Arranging a pack of playing cards
    (b) Database scenarios and distributes scenarios
    (c) Arranging books on a library shelf
    (d) Oreal-time systems

    (a) Arranging a pack of playing cards

  55. How many passes does an insertion sort algorithm consist of?
  56. (a) N
    (b) N-1
    (c) N+1
    (d) N2

    (b) N-1

  57. Which of the following sorting algorithms is the fastest for sorting small arrays
  58. (a) Quick sort
    (b) Insertion sort
    (c) Shell sort
    (d) Heap sort

    (b) Insertion sort

  59. Which of the following sorting algorith ms is the fastest?
  60. (a) Bubble Sort
    (b) Quick Sort
    (c) Merge Sort
    (d) Selection Sort

    (b) Quick Sort

  61. Which of the following is true about merge sort?
  62. (a) Merge Sort works better than quick sort if data is accessed from slow sequential memory.
    (b) Merge Sort is stable sort by nature
    (c) Merge sort outperforms heap sort in most of the practical situations.
    (d) All of the ahove

  63. What is the average case time complexity of merge sort? *
  64. (a) O(n log n)
    (b) o(n2)
    (c) o(n2 log n)
    (d) O(n log n2)

  65. In a stack, if a user tries to remove an element from empty stack it is called
  66. (a) Underflow
    (b) Empty collection
    (c) Overflow
    (d) Garbage Collection

  67. The given array is arr = {1,2,4,3). Bubble sort is used to sort the array elements.How many iterations will be done to sort the array with improvised version?*
  68. (a) 4
    (b) 2
    (c) 1
    (d) 0

    (b) 2

  69. In computer science, algorithm refers to a special method usable by a computer for the solution to a problem.*
  70. (a) True
    (d) False

    (a) True

Data Structure and Alogrithm MCQs
Related Topic

"Data Structure and Alogrithm MCQs","Data Structure MCQ","Data Structures and Algorithms Multiple Choice Questions","Data Structures and Algorithms MCQ","data structures and algorithms questions and answers pdf","algorithm mcq questions and answers pdf","data structure interview questions","data structure and alogritm mcqs"

Post a Comment

To be published, comments must be reviewed by the administrator.

أحدث أقدم