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 […]
Artículos originales en español adaptados del libro Algoritmos explicados con claridad.
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 algoritmo voraz toma en cada paso la elección que parece mejor y nunca vuelve atrás. Es rápido […]
Una cola de prioridad responde rápido a una pregunta: ¿cuál es el elemento más urgente ahora mismo? Un […]
Los arreglos y las listas enlazadas almacenan secuencias, pero hacen compromisos opuestos sobre la disposición en memoria, y […]
Una tabla hash cambia un poco de memoria y un diseño cuidadoso por una de las promesas más […]
← Volver a Blog y artículos Elegir algoritmos resulta más fácil cuando los patrones principales están reunidos en una referencia […]
← Volver a Blog y artículos Un algoritmo puede funcionar con el ejemplo habitual y fallar precisamente en los límites […]
← Volver a Blog y artículos La búsqueda binaria sustituye un recorrido completo por la eliminación repetida de la mitad […]
← Volver a Blog y artículos Una pila y una cola almacenan elementos, pero representan órdenes de procesamiento diferentes. Elegir […]
← Volver a Blog y artículos Una buena estructura de datos hace que la operación principal sea sencilla, eficiente y […]
← Volver a Blog y artículos La notación Big O describe cómo aumenta el trabajo de un algoritmo cuando crece […]