Data Structures And Algorithms Quiz! Trivia

20 Questions | Attempts: 779
Share

SettingsSettingsSettings
Data Structures And Algorithms Quiz! Trivia - Quiz

Do you know anything about data structures and algorithms? Do you think you can pass this quiz? The data structure is a way of accumulating and organizing information in such a manner that we can perform operations on this data in an effective way. An algorithm is a finite set of instructions or logic written to complete a specific predefined task. Taking this quiz will help you see how much you know about data structures and algorithms.


Questions and Answers
  • 1. 
    Two main measures for the efficiency of an algorithm are
    • A. 

      Processor and memory

    • B. 

      Complexity and capacity

    • C. 

      Time and space

    • D. 

      Data and space

  • 2. 
    The time factor when determining the efficiency of algorithm is measured by
    • A. 

      Counting microseconds

    • B. 

      Counting the number of key operations

    • C. 

      Counting the number of statements

    • D. 

      Counting the kilobytes of algorithm

  • 3. 
    The space factor when determining the efficiency of algorithm is measured by
    • A. 

      Counting the maximum memory needed by the algorithm

    • B. 

      Counting the minimum memory needed by the algorithm

    • C. 

      Counting the average memory needed by the algorithm

    • D. 

      Counting the maximum disk space needed by the algorithm

  • 4. 
    Which of the following case does not exist in complexity theory?
    • A. 

      Best case

    • B. 

      Worst case

    • C. 

      Average case

    • D. 

      Null case

  • 5. 
    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 is not there at all

  • 6. 
    The Average case occurs in the linear search algorithm.
    • A. 

      When Item is somewhere in the middle of the array

    • B. 

      When Item is not in the array at all

    • C. 

      When Item is the last element in the array

    • D. 

      When Item is the last element in the array or is not there at all

  • 7. 
    The complexity of the average case of an algorithm is
    • A. 

      Much more complicated to analyze than that of worst case

    • B. 

      Much more simpler to analyze than that of worst case

    • C. 

      Sometimes more complicated and some other times simpler than that of worst case

    • D. 

      None or above

  • 8. 
    The complexity of linear search algorithm is
    • A. 

      O(n)

    • B. 

      O(log n)

    • C. 

      O(n2)

    • D. 

      O(n log n)

  • 9. 
    The complexity of Binary search algorithm is
    • A. 

      O(n)

    • B. 

      O(log )

    • C. 

      O(n2)

    • D. 

      O(n log n)

  • 10. 
    The complexity of Bubble sort algorithm is
    • A. 

      O(n)

    • B. 

      O(log n)

    • C. 

      O(n2)

    • D. 

      O(n log n)

  • 11. 
    The complexity of merge sort algorithm is
    • A. 

      O(n)

    • B. 

      O(log n)

    • C. 

      O(n2)

    • D. 

      O(n log n)

  • 12. 
    The indirect change of the values of a variable in one module by another module is called
    • A. 

      Internal change

    • B. 

      Inter-module change

    • C. 

      Side effect

    • D. 

      Side-module update

  • 13. 
    Which of the following data structure is not a linear data structure?
    • A. 

      Arrays

    • B. 

      Linked lists

    • C. 

      Both of above

    • D. 

      None of above

  • 14. 
    Which of the following data structure is a linear data structure?
    • A. 

      Trees

    • B. 

      Graphs

    • C. 

      Arrays

    • D. 

      None of above

  • 15. 
    The operation of processing each element in the list is known as
    • A. 

      Sorting

    • B. 

      Merging

    • C. 

      Inserting

    • D. 

      Traversal

  • 16. 
    Finding the location of the element with a given value is:
    • A. 

      Traversal

    • B. 

      Search

    • C. 

      Sort

    • D. 

      None of above

  • 17. 
    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 above situation

  • 18. 
    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. 

      For both of above situation

    • D. 

      For none of above situation

  • 19. 
    Each array declaration need not give, implicitly or explicitly, the information about
    • A. 

      The name of array

    • B. 

      the data type of array

    • C. 

      The first data from the set to be stored

    • D. 

      The index set of the array

  • 20. 
    The elements of an array are stored successively in memory cells because
    • A. 

      By this way computer can keep track only the address of the first element and the addresses of other elements can be calculated

    • B. 

      the architecture of computer memory does not allow arrays to store other than serially

    • C. 

      Both of above

    • D. 

      None of above

Back to Top Back to top
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.