Data Structure of XuetangX (Part 1) (2023 Spring) Deng Junhui's after-school homework wrong questions sorting

  1. The reverse number of a sequence is defined as the total number of reversed pairs in the sequence, and the total number of element comparisons performed by the insertion sort in the list of size n is:

The number of inversions of a sequence is defined as the total number of inversions in the sequence, and the total number of element comparisons performed by insertion sorting in a list of size n is:
insert image description here
答案:1B

  1. For ordered subsequences (set their length to k) during insertion sorting.
    For ordered subsequences (set their length to k) during insertion sorting:
    insert image description here

答案:2C

Guess you like

Origin blog.csdn.net/weixin_45339670/article/details/131793639