In algorithmic modular design, what is the primary difference between passing a parameter by value and passing a parameter by reference (variable)?
Algorithmes Et Programmation
Question · Easy
Movie hacker vs real life
Short
What is the worst-case time complexity of the binary search (recherche dichotomique) algorithm executed on a sorted 1D array containing n elements?
In selection sort (tri par sélection) applied to an array of n elements, how many key comparisons are performed in total?
Question · Medium
Consider the following Python code snippet: numbers = [10, 20, 30, 40, 50] result = numbers[1:4] What is the value of result?
What is the best-case time complexity of an optimized bubble sort (tri à bulles) that incorporates a boolean flag to track whether any swaps occurred during a pass?
In recursive programming, what is the essential role of the base case (condition d'arrêt)?
Consider the following recursive Python function: def calc(n): if n <= 1: return 1 return n * calc(n - 1) What is the return value of calc(4)?
In Python, given a 2D matrix represented as a list of lists: matrix = [ [1, 2, 3], [4, 5, 6], [7, 8, 9] ] Which expression retrieves the element 6 located at row index 1 and column index 2?
What is the advantage of accessing a dictionary value using `d.get(key, default)` instead of `d[key]` in Python?
What is the worst-case time complexity of insertion sort (tri par insertion), and under what input condition does this worst case occur?
In the quicksort algorithm, what is the precise outcome of the partitioning step (partitionnement) around a chosen pivot value?
Consider the naive recursive calculation of the n-th Fibonacci number: `fib(n) = fib(n-1) + fib(n-2)` with base cases `fib(0) = 0` and `fib(1) = 1`. What is the space complexity of this function on the call stack?
Question · Hard
In algorithmic structured programming, what is a record (enregistrement / struct), and how are its individual fields accessed?
What is the defining technical distinction between a text file (fichier texte) and a typed binary file (fichier typé d'enregistrements)?
Using the Euclidean algorithm (algorithme d'Euclide) based on successive divisions, what is the greatest common divisor (PGCD) of 48 and 18?
What happens when executing the following Python statements? text = "baccalaureat" text[0] = "B"
Which recurrence relation correctly describes the time complexity of the merge sort (tri fusion) algorithm for an array of size n, and what is its asymptotic solution?
What is the output of the following Python expression? (lambda x, y: x * 2 + y)(3, 4)
In algorithmic design, what is the fundamental structural distinction between a function (fonction) and a procedure (procédure)?
What is the critical behavioral difference between opening a file with mode 'w' versus mode 'a' in Python?
When performing an inorder traversal (parcours infixe) on a Binary Search Tree (BST / Arbre Binaire de Recherche), in what order are node values visited?
In sequential search (recherche séquentielle) on an unsorted array of n elements, how many element comparisons are required in the worst-case scenario?
Consider the following Python code snippet: def process(val): try: num = 10 / val return num except ZeroDivisionError: return -1 finally: print("Done") What happens when executing `result = process(0)`?
What does it mean for a sorting algorithm to be stable (tri stable)?
Consider the fast exponentiation algorithm (exponentiation rapide) defined recursively as: - pow(x, 0) = 1 - pow(x, n) = pow(x, n // 2)^2 if n is even - pow(x, n) = x * pow(x, n - 1) if n is odd What is the time complexity of computing x^n with this algorithm?
Given a matrix M of dimension m x n (m rows and n columns), what are the dimensions of its transpose matrix M_T, and which relationship defines its elements?
In Python programming, what is a key technical distinction between a tuple and a list?
Insertion sort (tri par insertion) is applied to T = [5, 2, 4, 1] in increasing order. What does the array contain after the first two insertion steps (inserting T[1], then T[2])?
Why is relying on global variables (variables globales) generally discouraged in modular algorithmic engineering?
What is the output of the following Python list comprehension? [x**2 for x in range(5) if x % 2 == 1]
When reading records sequentially from a typed file in algorithmic pseudocode, how is the end-of-file condition (Fin de Fichier / EOF) properly handled?
Under what circumstance does the classic quicksort algorithm using the first element as the pivot exhibit its worst-case time complexity of O(n^2)?
Which recursive formulation correctly reverses a string s of length n?
Consider the recursive Python function def f(n): return 0 if n == 0 else n % 10 + f(n // 10). What does f(2026) return?
What is the result of evaluating the following Python dictionary comprehension? {x: x * 3 for x in range(1, 4)}
In the Entity-Relationship (Entité-Association / MCD) model of database design, what defines an entity (entité) and an attribute (propriété)?
Bases De Donnees
In transforming a Conceptual Data Model (MCD) to a Relational Model (MLD), how is a binary relationship between entity A with cardinality (1,1) and entity B with cardinality (0,N) translated?
In transforming an MCD to an MLD, how is a binary relationship with cardinalities (0,N) and (0,N) (many-to-many) between two entities translated?
What two essential constraints must be satisfied by any column designated as the Primary Key (Clé Primaire) of a relational table?
What is the purpose of a Foreign Key (Clé Étrangère) constraint in a relational database?
What is the mandatory condition for a relational database table to be in First Normal Form (1NF / Première Forme Normale)?
A table is in First Normal Form (1NF) with a composite primary key (StudentID, CourseID). Under what condition does it violate Second Normal Form (2NF)?
Consider a table in 2NF with schema `Employee(EmpID, DeptID, DeptName, Salary)` where EmpID is the primary key. If functional dependencies EmpID -> DeptID and DeptID -> DeptName exist, why does this table violate Third Normal Form (3NF)?
Which of the following SQL statements belongs strictly to the Data Definition Language (DDL / LDD) rather than the Data Manipulation Language (DML / LMD)?
In what logical order does a relational database management system execute the clauses of a standard SQL SELECT query?
What is the critical semantic difference between the WHERE clause and the HAVING clause in an SQL statement?
Given two tables, `Students` and `Enrollments`, what is the difference between an INNER JOIN and a LEFT JOIN on `Students.id = Enrollments.student_id`?
Loading more…