Computer Data Structure And Algorithms 1(TTA)

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Harry.hot02
H
Harry.hot02
Community Contributor
Quizzes Created: 6 | Total Attempts: 1,117
| Attempts: 121 | Questions: 25
Please wait...
Question 1 / 25
0 %
0/100
Score 0/100
1. Which of the following data structure is linear data structure?

Explanation

Arrays are a linear data structure because they store elements in a sequential manner, where each element is accessed using its index. The elements in an array are stored contiguously in memory, allowing for efficient access and traversal. Unlike trees and graphs, which have a hierarchical or non-linear structure, arrays have a simple and straightforward organization. Therefore, arrays are the correct answer as a linear data structure.

Submit
Please wait...
About This Quiz
Computer Data Structure And Algorithms 1(TTA) - Quiz

INSTRUCTIONS
1. NUMBER OF QUESTIONS 25
2. HAS A TIME LIMIT OF 15 MINUTES
3. HAS A PASS MARKS OF 30%
4. QUESTIONS PER PAGE 1
5. EACH QUESTIONS HAS 1 MARKS
6. NEGATIVE MARKING FOR EACH QUESTIONS 0.25
7. WILL ALLOW TO YOU GO BACK ,SKIP AND CHANGE YOUR ANSWERS
8. WILL ALLOW TO YOU PRINT OUT... see moreYOUR RESULT AND CERTIFICATE
9. WILL ALLOW TO YOU PRINT OUT YOURS RESPONSE SHEET WITH CORRECT ANSWER KEY AND EXPLANATION
10. WE WILL PROVIDE YOURS RESULT,CERTIFICATE AND YOUR RESPONSE SHEET TO YOURS EMAIL ID AT END OF ONLINE TEST


.
.
.
. see less

Personalize your quiz and earn a certificate with your name on it!
2. The memory address of the first element of an array is called

Explanation

The memory address of the first element of an array is called the base address. This is because the base address serves as the starting point or foundation for accessing the elements of the array. It is the reference point from which the positions of other elements in the array are calculated.

Submit
3. The Average case occur in linear search algorithm when

Explanation

The average case in a linear search algorithm occurs when the item being searched for is somewhere in the middle of the array. This means that on average, the algorithm will have to iterate through approximately half of the array before finding the item. In the other scenarios mentioned, such as when the item is not in the array at all or when it is the last element, the algorithm may have to iterate through the entire array before determining that the item is not present.

Submit
4. Linked lists are best suited

Explanation

Linked lists are best suited for situations where the size of the structure and the data in the structure are constantly changing. This is because linked lists allow for efficient insertion and deletion of elements at any position, without the need to reallocate memory or shift existing elements. The dynamic nature of linked lists makes them ideal for scenarios where the size of the data structure is unpredictable or frequently modified.

Submit
5. The complexity of Binary search algorithm is

Explanation

The correct answer is O(log n) because binary search algorithm divides the search space in half with each iteration, effectively reducing the number of elements to search by half. This logarithmic time complexity makes binary search very efficient for large datasets.

Submit
6. The worst case occur in linear search algorithm when

Explanation

The worst case in a linear search algorithm occurs when the item being searched for is either the last element in the array or not present in the array at all. In both cases, the algorithm would have to iterate through all the elements in the array before determining that the item is not there or finding it as the last element. This results in the maximum possible number of comparisons and the worst time complexity for the linear search algorithm.

Submit
7. Which of the following case does not exist in complexity theory

Explanation

In complexity theory, the best case refers to the scenario where an algorithm performs optimally and achieves the lowest possible time or space complexity. The worst case refers to the scenario where an algorithm performs the least efficiently and has the highest time or space complexity. The average case refers to the scenario where an algorithm performs with an average level of efficiency. However, the null case does not exist in complexity theory as it does not represent any specific scenario or input for an algorithm.

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

Explanation

When declaring an array, it is not necessary to provide information about the first data from the set to be stored. The declaration only needs to include the name of the array, the data type of the array, and the index set of the array. The first data from the set to be stored can be assigned later when initializing the array or when assigning values to specific indices of the array.

Submit
9. Finding the location of the element with a given value is:

Explanation

The correct answer is "Search" because finding the location of an element with a given value involves searching through a data structure or collection to locate the desired element. Traversal refers to the process of accessing each element in a data structure, while sorting involves arranging elements in a specific order. None of the above options accurately describe the process of finding the location of an element with a given value.

Submit
10. Which of the following is not the required condition for binary search algorithm?

Explanation

Binary search algorithm requires the list to be sorted and there should be direct access to the middle element in any sublist. However, it does not require a mechanism to delete and/or insert elements in the list. The algorithm is based on repeatedly dividing the search space in half, so it only needs to access and compare elements in the list, not modify or update them.

Submit
11. Two main measures for the efficiency of an algorithm are

Explanation

The efficiency of an algorithm is typically measured in terms of the time it takes to execute and the amount of memory space it requires. Time refers to the number of operations or steps the algorithm takes to complete, while space refers to the amount of memory or storage it uses. Therefore, "Time and space" is the correct answer as it accurately represents the two main measures for algorithm efficiency.

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

Explanation

The efficiency of an algorithm is determined by measuring the time factor, which is commonly done by counting the number of key operations. Key operations refer to the fundamental operations that are performed in the algorithm, such as comparisons, assignments, and arithmetic operations. By counting the number of key operations, we can get an idea of how efficiently the algorithm is performing and compare it to other algorithms. Counting micro seconds, the number of statements, or the kilobytes of the algorithm may not accurately reflect the time factor or efficiency of the algorithm.

Submit
13. The elements of an array are stored successively in memory cells because

Explanation

When the elements of an array are stored successively in memory cells, the computer only needs to keep track of the address of the first element. By knowing the address of the first element, the computer can easily calculate the addresses of the other elements in the array by using the size of each element. This allows for efficient memory management and access to array elements.

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

Explanation

Traversal is the correct answer because it refers to the process of accessing each element in a list or data structure, usually in a sequential manner. This operation does not involve any specific sorting, merging, or inserting of elements, but rather focuses on visiting and examining each item individually. Traversal is commonly used in algorithms and data structures to perform various operations on the elements, such as searching, printing, or modifying them.

Submit
15. The complexity of merge sort algorithm is

Explanation

The complexity of the merge sort algorithm is O(n log n) because it divides the input array into two halves, recursively sorts each half, and then merges the two sorted halves. The merging step takes O(n) time, and the recursion occurs log n times since the array is divided in half each time. Therefore, the overall time complexity is O(n log n).

Submit
16. . Which of the following data structures are indexed structure?

Explanation

Linear arrays are indexed structures because elements in a linear array can be accessed directly using their index values. Each element in the array is assigned a unique index starting from 0, allowing for efficient and direct access to any element in the array. On the other hand, linked lists are not indexed structures as each element in a linked list only contains a reference to the next element, making it necessary to traverse the list sequentially to access a specific element.

Submit
17. Which of the following is not a limitation of binary search algorithm?

Explanation

The given answer states that the binary search algorithm is not efficient when the data elements are more than 1000. This means that the algorithm may take longer to execute and may not be as effective in finding the desired element when the number of data elements exceeds 1000. This limitation suggests that the binary search algorithm may not be the best choice for large datasets and alternative algorithms may be more suitable.

Submit
18. The space factor when determining the efficiency of algorithm is measured by

Explanation

The space factor when determining the efficiency of an algorithm is measured by counting the maximum memory needed by the algorithm. This means that the efficiency of the algorithm is evaluated based on the maximum amount of memory it requires to execute. By considering the maximum memory needed, we can assess how efficiently the algorithm utilizes memory resources. This measurement helps in understanding the space complexity of the algorithm and comparing it with other algorithms to determine their efficiency in terms of memory usage.

Submit
19. Arrays are best data structures

Explanation

Arrays are best data structures for relatively permanent collections of data because arrays have a fixed size and are able to efficiently store and access elements at specific indices. This makes them suitable for situations where the size of the structure and the data in the structure are not constantly changing. Arrays provide direct access to elements, allowing for fast retrieval and modification of data. However, if the size of the structure or the data in the structure is constantly changing, other data structures like linked lists may be more appropriate.

Submit
20. The complexity of Bubble sort algorithm is

Explanation

The complexity of the Bubble sort algorithm is O(n2) because it involves comparing and swapping adjacent elements in a list multiple times until the entire list is sorted. In the worst-case scenario, where the list is in reverse order, Bubble sort requires n-1 passes to sort n elements. This results in a time complexity of O(n2), making it inefficient for large lists.

Submit
21. The complexity of the average case of an algorithm is

Explanation

The complexity of the average case of an algorithm is much more complicated to analyze than that of the worst case. This is because the average case takes into account all possible inputs and their probabilities, whereas the worst case only considers the input that would result in the maximum amount of operations. Analyzing the average case requires considering a wider range of inputs and their likelihoods, making it more complex.

Submit
22. The complexity of linear search algorithm is

Explanation

The complexity of linear search algorithm is O(n) because in the worst case scenario, the algorithm needs to iterate through each element of the input list or array until it finds the desired element. This means that the time it takes to complete the search grows linearly with the size of the input.

Submit
23. Two dimensional arrays are also called

Explanation

Two dimensional arrays are also called tables arrays and matrix arrays. This is because they can be represented as tables or matrices with rows and columns. In a two dimensional array, data is organized in a grid-like structure, where each element is identified by its row and column index. Thus, the correct answer is both.

Submit
24. Which of the following data structure is not linear data structure?

Explanation

The given question asks for a data structure that is not linear. Both arrays and linked lists are examples of linear data structures, as they store data elements in a sequential manner. Therefore, the correct answer is "none of these" because both arrays and linked lists are linear data structures.

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

Explanation

When the values of a variable in one module are changed indirectly by another module, it is referred to as a "side effect." This means that the action or behavior of one module has an unintended impact on another module, resulting in a change in the variable's value. Side effects can occur when modules interact and share data, and they can sometimes lead to unexpected or undesired consequences in the program's execution.

Submit
View My Results

Quiz Review Timeline (Updated): Jan 20, 2025 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Jan 20, 2025
    Quiz Edited by
    ProProfs Editorial Team
  • Aug 28, 2016
    Quiz Created by
    Harry.hot02
Cancel
  • All
    All (25)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Which of the following data structure is linear data structure?
The memory address of the first element of an array is called
The Average case occur in linear search algorithm when
Linked lists are best suited
The complexity of Binary search algorithm is
The worst case occur in linear search algorithm when
Which of the following case does not exist in complexity theory
Each array declaration need not give, implicitly or explicitly, the...
Finding the location of the element with a given value is:
Which of the following is not the required condition for binary search...
Two main measures for the efficiency of an algorithm are
The time factor when determining the efficiency of algorithm is...
The elements of an array are stored successively in memory cells...
The operation of processing each element in the list is known as
The complexity of merge sort algorithm is
. Which of the following data structures are indexed structure?
Which of the following is not a limitation of binary search algorithm?
The space factor when determining the efficiency of algorithm is...
Arrays are best data structures
The complexity of Bubble sort algorithm is
The complexity of the average case of an algorithm is
The complexity of linear search algorithm is
Two dimensional arrays are also called
Which of the following data structure is not linear data structure?
The indirect change of the values of a variable in one module by...
Alert!

Advertisement