Recurso · Guía o artículo
Pascal's Triangle
Explica cómo se construye el triángulo de Pascal a partir de los coeficientes binomiales y cómo calcular una fila de forma eficiente, un patrón que aparece en preguntas de programación de combinatoria.
Revisado
Abrir el original: Pascal's Triangle (abre el sitio original en una pestaña nueva)Añadir a una hoja de ruta
Guarda este recurso junto a una hoja de ruta que sigues. Aparece como un recurso extra tuyo; los pasos de la hoja de ruta no cambian y no cuenta para tus pasos registrados.
Contenido de la fuente: inglés
In mathematics, Pascal's triangle is a triangular array of the binomial coefficients. The rows of Pascal's triangle are conventionally enumerated starting with row n = 0 at the top (the 0th row). The entries in each row are numbered from the left beginning with k = 0 and are usually staggered relative to the numbers in the adjacent rows. The triangle may be constructed in the following manner: In row 0 (the topmost row), there is a unique nonzero entry 1. Each entry of each subsequent row is constructed by adding the number above and to the left with the number above and to the right, treating blank entries as 0. For example, the initial number in the first (or any other) row is 1 (the sum of 0 and 1), whereas the numbers 1 and 3 in the third row are added to produce the number 4 in the fourth row. The entry in the nth row and kth column of Pascal's triangle is denoted . For example, the unique nonzero entry in the topmost row is .
Resumen de PrepKit
El equipo editorial de PrepKit redactó y revisó este resumen a partir del repositorio de origen. No es texto del propio recurso.
- Adecuado para
- La fuente no indica un nivel
- Formato
- Referencia
Qué cubre
- Regla de construcción: cada entrada es la suma de las dos que tiene encima, contando los huecos como 0.
- Sección de fórmulas que relaciona las entradas con los coeficientes binomiales.
- Calcular las entradas del triángulo en tiempo O(n): obtener C(n, i) a partir de C(n, i - 1) en O(1) por paso.
Cómo usarlo
Consejo de estudio de PrepKit, no una afirmación de la fuente.
Genera la fila 10 de dos maneras, sumando la fila anterior y con la recurrencia de C(n, i - 1), y confirma que coinciden.
Alcance y limitaciones
Las fórmulas aparecen como imágenes y la página se apoya en enlaces a Wikipedia y GeeksForGeeks. Sin ejercicios.
Acceso y formato
Se lee en GitHub; README en inglés del proyecto trekhleb/javascript-algorithms, con licencia MIT.
Revisado por PrepKit el 2 oct 2026. Commit de la fuente del recurso: 85293e3e2b88
Evidencias de este resumen
- src/algorithms/math/pascal-triangle/README.md
Páginas que lo incluyen
Recibe el boletín de PrepKit
Opcional. No lo necesitas para usar PrepKit.