QCM : Fundamentals of Algorithms and Data Structures — 12 questions

Questions et réponses du QCM

1. What is an algorithm primarily characterized as?

A finite, well-ordered sequence of elementary operations that specifies a calculation scheme
A data structure used to organize and store data efficiently
A set of instructions written in a specific programming language for execution
A process that transforms input data into output data through a series of steps

A finite, well-ordered sequence of elementary operations that specifies a calculation scheme

Explication

The correct answer is the first option because an algorithm is defined as a finite, well-ordered sequence of elementary operations that provides a calculation scheme, as per the Encyclopaedia Universalis. The other options describe related concepts but do not capture the core definition of an algorithm.

2. Who is the historical figure from whom the term 'algorithm' is derived?

Euclid
Wirth
Al-Khwarizmi
Babylonians

Al-Khwarizmi

Explication

The term 'algorithm' is derived from the name of the Persian mathematician Al-Khwarizmi, whose work in the 9th century laid the foundations for systematic calculation methods, and the name was later Latinized to 'algorithm'.

3. What is the primary role of a program in computing?

A program is a hardware component responsible for processing data.
A program provides a sequence of instructions that the computer follows to perform a specific task.
A program is a user interface that allows interaction with the computer.
A program is a data storage system used to save information.

A program provides a sequence of instructions that the computer follows to perform a specific task.

Explication

The primary role of a program is to provide a sequence of instructions that the computer follows to perform specific tasks, guiding hardware operations to achieve desired results.

4. When was the notion of algorithm complexity formally established or developed?

In the 9th century AD, with Al-Khwarizmi's work on systematic calculation
In the 1800s, during the development of early mechanical calculators
In the 3rd century BC, with Euclid's work on algorithms
In the 1960s, with the formal development of Big O notation and complexity analysis

In the 1960s, with the formal development of Big O notation and complexity analysis

Explication

The concept of algorithm complexity, especially the formal analysis using Big O notation, was developed in the 1960s, making it the earliest period when the notion was systematically established in computer science.

5. How do sequential search and binary search algorithms differ in their approach to finding an element?

Sequential search has a logarithmic time complexity, while binary search has linear complexity.
Sequential search works only on sorted data, while binary search works on unsorted data.
Both algorithms require the data to be sorted before searching.
Sequential search compares elements one by one, whereas binary search repeatedly divides the search interval in half.

Sequential search compares elements one by one, whereas binary search repeatedly divides the search interval in half.

Explication

Sequential search compares each element one by one and can be used on any data, while binary search requires sorted data and works by dividing the search interval in half, making it more efficient on sorted data. The correct option correctly describes this fundamental difference.

6. Who is credited with the concept underlying sorting algorithms?

Wirth
Euclid
Al-Khwarizmi
The author of the sorting problem

Al-Khwarizmi

Explication

Al-Khwarizmi, a Persian mathematician from the 9th century, is credited with the development of systematic calculation methods and the origin of the term 'algorithm,' which forms the basis for sorting algorithms.

7. What is the effect of choosing a hash table with chaining collision resolution on the performance of search operations in data structures?

It improves search efficiency by allowing constant-time access in the average case.
It causes search operations to become more memory-efficient but slower.
It has no effect on search performance compared to other data structures.
It significantly decreases search efficiency due to complex collision handling.

It improves search efficiency by allowing constant-time access in the average case.

Explication

Choosing a hash table with chaining collision resolution generally improves search efficiency because, on average, it allows for constant-time access, assuming a good hash function and low load factor. This is a cause-effect relationship where the data structure's properties directly influence algorithm performance.

8. In which practical scenario would you most likely use a stack data structure?

Tracking function calls and execution order in a program
Scheduling processes in an operating system
Managing a print queue in a printer spooler
Storing a list of students sorted alphabetically

Tracking function calls and execution order in a program

Explication

Using a stack is most appropriate for managing function calls and execution order because of its Last-In-First-Out (LIFO) nature, which models how function calls are pushed onto the call stack and removed when functions return.

9. What is the fundamental component of a linked list?

Array
Data field
Node
Pointer

Node

Explication

A linked list is composed of nodes, each containing data and a pointer to the next node. The node is the fundamental component that links the list together and allows dynamic data management.

10. What is a tree in data structures?

A linear collection of elements where each element points to the next, like a linked list.
A collection of elements stored in contiguous memory locations, allowing direct access via indices.
A set of elements with no particular order, where elements are added or removed arbitrarily.
A hierarchical data structure composed of nodes connected by edges, with parent-child relationships and a single root.

A hierarchical data structure composed of nodes connected by edges, with parent-child relationships and a single root.

Explication

A tree is defined as a hierarchical data structure where each node has a parent (except the root) and zero or more children, forming a hierarchy with a single root node. This matches option 2, which correctly describes a tree.

11. What is the size of an adjacency matrix used to represent a graph with n vertices?

n x 2n
n x n
n x (n+1)
n x (n-1)

n x n

Explication

The adjacency matrix for a graph with n vertices is an n x n two-dimensional array, where each cell indicates the presence or absence of an edge between vertices. This is explicitly stated in the content.

12. What is the primary role of hashing techniques in data management?

To encrypt data for security
To validate data integrity
To compress data for storage efficiency
To facilitate quick data retrieval

To facilitate quick data retrieval

Explication

Hashing techniques are primarily used to facilitate quick data retrieval by mapping keys to specific locations in a hash table, enabling efficient access.

Révisez avec les flashcards

Mémorisez les réponses avec 24 flashcards sur Fundamentals of Algorithms and Data Structures.

Algorithm — definition?

Finite sequence of elementary operations solving a problem.

Algorithm expression — language?

Language-independent; describes *what* to do, not *how*.

Program — concept?

Sequence of instructions executed by hardware to perform tasks.

Voir les flashcards →

Approfondir avec la fiche

Consultez la fiche de révision complète sur Fundamentals of Algorithms and Data Structures.

Voir la fiche →

Cours similaires

Crée tes propres QCM

Importe ton cours et l'IA génère des QCM avec corrections en 30 secondes.

Générateur de QCM