Set 1 Computer Science Algorithm and Data structure quiz

20 Questions

Quiz Description

In this algorithm quiz, we would see that we follow a set of particular rules often, maybe when solving a quadratic equation, or when cooking, or when executing a particular task. These instructions that are aimed at disciplining oneself before the execution of a task are what we call Algorithms. Programmers use algorithms all the time to finish particular tasks. We are going to see terms like arrays, records, pointers, linked lists, stacks, queues, recursion, trees, sorting and searching, and learn all before the end of this quiz.

An algorithm is simply a set of finite instructions that aid you in the completion of a certain task. A typical example could be long division.

The data structure is a data organization, management, and storage format that enables efficient access and modification. More precisely, a data structure is a collection of data values as well as the relationships among them, and the functions or operations that can be applied to the data. The type of data structures are,

  • Linear: arrays, lists.
  • Tree: binary, heaps, space partitioning etc.
  • Hash: distributed hash table, hash tree etc.
  • Graphs: decision, directed, acyclic etc.

More quizzes can be found here after you have seen as you answer questions on this quiz. More quizzes on Computer science can be found at Computer quizzes.

Nice time!!!

1:

Two main measures for the efficiency of an algorithm are 


Correct
  • 1:
    Processor
  • 2:
    Complexity and capacity
  • 3:
    Time and space
  • 4:
    Data and space
2:

  The time factor when determining the efficiency of algorithm is measured by 


Correct
  • 1:
    Counting microseconds
  • 2:
    Counting the number of keys operations
  • 3:
    Counting the number of statements
  • 4:
    Counting the kilobytes of algorithm
3:

  The space factors when determining the efficiency of algorithm is measured by 


Correct
  • 1:
    Counting the maximum memory needed by the algorithm
  • 2:
    Counting the minimum memory needed by the algorithm
  • 3:
    Counting the average memory needed by the algorithm
  • 4:
    Counting the maximum disk space needed by the algorithm
4:

  Which of the following case does no exist in complexity theory 


Correct
  • 1:
    Best case
  • 2:
    Worst case
  • 3:
    Average case
  • 4:
    Null case
5:

  The worst case occurs in linear search algorithm when 


Correct
  • 1:
    Item is somewhere in the middle of the array
  • 2:
    Item is not in the array at all
  • 3:
    Item is the last element in the array
  • 4:
    Item is the last element in the array or is not there at all
6:

  The average case occurs in linear search algorithm 


Correct
  • 1:
    When item is somewhere in the middle of the array
  • 2:
    When item is not in the array at all
  • 3:
    When item is the last element in the array
  • 4:
    When item is the element is the array or is not there at all
7:

  The complexity of the average case of an algorithm is 


Correct
  • 1:
    Much more complicated to analyze than of wort case
  • 2:
    Much more simpler to analyze than that of worst case
  • 3:
    Sometimes more complicated and some other times simpler than that of worst case
  • 4:
    None of the above
8:

  The complexity of linear search algorithm is 


Correct
  • 1:
    O(n)
  • 2:
    O(log n)
  • 3:
    O(n2)
  • 4:
    O(n log n)
9:

  The complexity of binary search algorithm is 


Correct
  • 1:
    O(n)
  • 2:
    O(log n)
  • 3:
    O(n2)
  • 4:
    O(n log n)
10:

  The complexity of Bubbles sort algorithm is 


Correct
  • 1:
    O(n)
  • 2:
    O(log n)
  • 3:
    O(n2)
  • 4:
    O(n log n)
11:

  The complexity of merge sort algorithm is 


Correct
  • 1:
    O(n)
  • 2:
    O(log n)
  • 3:
    O(n2)
  • 4:
    O(n log n)
12:

The indirect change of the values of a variable in one module by another module is called 


Correct
  • 1:
    Internal change
  • 2:
    Inter-module change
  • 3:
    Side effect
  • 4:
    Side-module update
13:

  Which of the following data structure is not linear data structure? 


Correct
  • 1:
    Arrays
  • 2:
    Linked list
  • 3:
    Both of above
  • 4:
    None of above
14:

  Which of the following data structure is linear data structure? 


Correct
  • 1:
    Trees
  • 2:
    Graphs
  • 3:
    arrays
  • 4:
    None of above
15:

  The operation of processing each element in the list is known as 


Correct
  • 1:
    Sorting
  • 2:
    Merging
  • 3:
    Inserting
  • 4:
    Transversal
16:

  Finding the location of the elements with a given value is 


Correct
  • 1:
    Traversal
  • 2:
    Search
  • 3:
    Sort
  • 4:
    None of above
17:

  Arrays are best data structures 


Correct
  • 1:
    For relatively permanent collection of data
  • 2:
    For the size of the structure and the data in the structure are constantly changing
  • 3:
    For both of above situation
  • 4:
    For none of above situation
18:

  Linked list are best suited


Correct
  • 1:
    For relatively permanent collections of data
  • 2:
    For the size of the structure and the data in the structure are constantly changing
  • 3:
    For both of above situation
  • 4:
    For none of above situation
19:

  Each array declaration need not give, implicitly or explicitly, the information about 


Correct
  • 1:
    The name of array
  • 2:
    The data type of array
  • 3:
    The first data from the set to be stored
  • 4:
    The index set of the array
20:

  The element of an array are stored successively in memory cells because 


Correct
  • 1:
    By this way computer can keep track only the address of the first element and the address of others elements can be calculated
  • 2:
    The architecture of computer memory does not allow arrays to store other than serially
  • 3:
    Both of the above
  • 4:
    None of the above

Feature Image

Set 1 Computer Science Algorithm and Data structure quiz