-->
当前位置:首页 > 题库 > 正文内容

程序填空题:Shellsort Runs

Luz4年前 (2021-05-10)题库1439
Show the result of running Shellsort on the input 9, 8, 7, 6, 5, 4, 3, 2, 1 using the increments {1, 3, 7}. Please fill in the blanks in the table.

Note: There must be one space between a pair of adjacent numbers, but no extra space at the beginning or the end of the line.

|Original| 9 8 7 6 5 4 3 2 1 |
|:------:|:-----------------|
|After 7-sort|@@[2 1 7 6 5 4 3 9 8](1)|
|After 3-sort|@@[2 1 4 3 5 7 6 9 8](1)|
|After 1-sort| 1 2 3 4 5 6 7 8 9 |





答案:
第1空:2 1 7 6 5 4 3 9 8

第2空:2 1 4 3 5 7 6 9 8

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。