Skip to content
This repository was archived by the owner on Jul 18, 2026. It is now read-only.

Commit b71c571

Browse files
author
Jose Storopoli
committed
fix(radix-sort): include the floor in max / exp
1 parent c1cb914 commit b71c571

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

slides/slides-pt.typ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2999,7 +2999,7 @@ proposicional pode ser tornada verdadeira* por meio de uma atribuição adequada
29992999
title: smallcaps[Função radix_sort(_array_ A, n):],
30003000
)[
30013001
+ $max := "find_max"(A)$
3002-
+ *para* $"exp" := 1$; $"max" / "exp" > 0$; $"exp" *= 10$:
3002+
+ *para* $"exp" := 1$; $floor("max" / "exp") > 0$; $"exp" *= 10$:
30033003
+ $"counting_sort_by_digit"(A, n, "exp")$
30043004
]
30053005
],

slides/slides.typ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2978,7 +2978,7 @@ subtrees is at most 1.
29782978
title: smallcaps[Function radix_sort(array A, n):],
29792979
)[
29802980
+ $max := "find_max"(A)$
2981-
+ *for* $"exp" := 1$; $"max" / "exp" > 0$; $"exp" *= 10$:
2981+
+ *for* $"exp" := 1$; $floor("max" / "exp") > 0$; $"exp" *= 10$:
29822982
+ $"counting_sort_by_digit"(A, n, "exp")$
29832983
]
29842984
],

0 commit comments

Comments
 (0)