Skip to content

Commit 5392268

Browse files
committed
Fix array position in text
1 parent fdb5449 commit 5392268

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/resources/de/moritzf/sorting/logic/sorting/shellsort.tex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,17 @@ \chapter*{Shellsort}
3030

3131
\texttt{array}: array with numbers that are to be sorted
3232

33-
\texttt{steplengths}: array with steplengths that are to be used. In our definition, steplengths are arranged in descending order (eg. steplengths = [8,4,2,1]). A practical steplengths-array must further fulfill the condition $steplengths[0] < array.length$.
33+
\texttt{steplengths}: array with steplengths that are to be used. In our definition, steplengths are arranged in descending order (eg. steplengths = [8,4,2,1]). A practical steplengths-array must further fulfill the condition $steplengths[1] < array.length$.
3434

3535

3636
\begin{lstlisting}
3737
procedure shellsort(array, steplengths)
3838
---------------------------------------
3939
begin
4040
for each steplength in steplengths do
41+
begin
4142
for i := 1 to steplength do
43+
begin
4244
sort(array, i, steplength)
4345
end
4446
end

0 commit comments

Comments
 (0)