You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/i18n/translations.ts
+44Lines changed: 44 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -724,6 +724,28 @@ Properties:
724
724
- Adaptive
725
725
726
726
Shell Sort is faster than Insertion Sort for larger arrays because it moves elements closer to their final position earlier. Performance depends heavily on the gap sequence chosen.`,
727
+
'bucket-sort': `Bucket Sort
728
+
729
+
Bucket Sort is a distribution-based sorting algorithm that works by partitioning an array into a number of buckets. Each bucket is then sorted individually using another sorting algorithm or recursively applying the bucket sort.
730
+
731
+
How it works:
732
+
1. Find the range (min/max) to determine bucket indices
733
+
2. Create empty buckets based on a fixed size (e.g., 10 or 20)
734
+
3. Distribute elements into buckets: index = floor((value - min) / size)
735
+
4. Sort each non-empty bucket using Insertion Sort
736
+
5. Collect elements from sorted buckets back into the main array
737
+
738
+
Time Complexity:
739
+
Best: O(n + k) — uniform distribution
740
+
Average: O(n + k)
741
+
Worst: O(n²) — all elements fall into one bucket
742
+
743
+
Space Complexity: O(n + k) — extra space for buckets
744
+
745
+
Properties:
746
+
- Stable sort (if underlying sort is stable)
747
+
- Not in-place
748
+
- Data-distribution dependent`,
727
749
728
750
'jump-search': `Jump Search
729
751
@@ -1634,6 +1656,28 @@ Propiedades:
1634
1656
- Adaptativo
1635
1657
1636
1658
Shell Sort es más rápido que Insertion Sort para arreglos grandes porque mueve elementos más cerca de su posición final antes. El rendimiento depende mucho de la secuencia de brechas elegida.`,
1659
+
'bucket-sort': `Bucket Sort (Ordenamiento por Cubetas)
1660
+
1661
+
Bucket Sort es un algoritmo de ordenamiento basado en la distribución que funciona particionando un arreglo en varias cubetas. Cada cubeta se ordena individualmente usando otro algoritmo de ordenamiento o aplicando recursivamente el mismo algoritmo.
1662
+
1663
+
Cómo funciona:
1664
+
1. Encontrar el rango (mín/máx) para determinar los índices de las cubetas
1665
+
2. Crear cubetas vacías basadas en un tamaño fijo (por ejemplo, 10 o 20)
1666
+
3. Distribuir elementos en las cubetas: índice = suelo((valor - mín) / tamaño)
1667
+
4. Ordenar cada cubeta no vacía usando Insertion Sort
1668
+
5. Recolectar elementos de las cubetas ordenadas de vuelta al arreglo principal
1669
+
1670
+
Complejidad Temporal:
1671
+
Mejor: O(n + k) — distribución uniforme
1672
+
Promedio: O(n + k)
1673
+
Peor: O(n²) — todos los elementos caen en una sola cubeta
1674
+
1675
+
Complejidad Espacial: O(n + k) — espacio extra para cubetas
1676
+
1677
+
Propiedades:
1678
+
- Ordenamiento estable (si el ordenamiento subyacente lo es)
0 commit comments