Test boundaries where an algorithm changes its behavior
Boundary cases are inputs near a decision point in the algorithm or in its contract. They often reveal […]
Articles originaux en français adaptés du livre Les algorithmes en clair.
Boundary cases are inputs near a decision point in the algorithm or in its contract. They often reveal […]
A priority queue retrieves an item with the best priority according to a defined ordering. It is useful […]
Union-find maintains a partition of items into disjoint groups. It supports asking which group contains an item and […]
The same graph can be represented as an adjacency matrix or as adjacency lists. The representation affects both […]
A greedy algorithm makes a locally attractive choice and continues without revisiting that decision. Before relying on that […]
Memoization stores answers when a recursive computation first asks for them. Tabulation fills a collection of answers in […]
Dynamic programming stores solutions to overlapping subproblems so that the same work is not repeated. The difficult design […]
A topological ordering places each prerequisite before the tasks that depend on it. Such an ordering exists for […]
Depth-first search follows a branch as far as it can before exploring alternatives. A tree has a built-in […]
Breadth-first search explores a graph in increasing numbers of edges from a starting vertex. With equal edge costs, […]
A set represents which distinct values are present. A map associates each key with a value. Choosing between […]
A prefix-sum array stores cumulative totals so that the sum of a contiguous range can be recovered by […]
A sorting routine depends on a comparison rule that behaves consistently across all input records. A rule that […]
A stable sorting algorithm preserves the original relative order of records whose sort keys compare equal. This matters […]
A recursive function solves a problem by calling itself on a smaller instance. Correctness depends on knowing when […]
A loop invariant is a statement that remains true whenever execution returns to the start of a loop. […]
A greedy algorithm makes the best-looking choice at each step and never looks back. It is fast and […]
A priority queue answers one question quickly: which item is the most urgent right now? A heap is […]
Arrays and linked lists both store sequences, but they make opposite trade-offs about memory layout, and that choice […]
A hash table trades a little memory and some careful design for one of the most useful promises […]
Un algorithme glouton fait à chaque étape le choix qui semble le meilleur, sans jamais revenir en arrière. […]
Une file de priorité répond rapidement à une question : quel élément est le plus urgent en ce […]
Les tableaux et les listes chaînées stockent tous deux des séquences, mais leurs compromis sur la disposition en […]
Une table de hachage échange un peu de mémoire et une conception soignée contre l’une des promesses les […]
← Retour aux articles Les choix algorithmiques deviennent plus simples lorsque les principaux repères sont réunis sur une seule fiche. […]
← Retour aux articles Un algorithme peut réussir sur un exemple ordinaire et échouer exactement aux frontières du problème. Les […]
← Retour aux articles La recherche binaire remplace un balayage complet par une élimination répétée de la moitié des possibilités. […]
← Retour aux articles Une pile et une file stockent toutes deux des éléments, mais elles expriment deux ordres de […]
← Retour aux articles Une bonne structure de données rend l’opération essentielle simple, rapide et difficile à utiliser de travers. […]
← Retour aux articles La notation Big O décrit la façon dont le travail d’un algorithme évolue lorsque la quantité […]