Question 37
In a list L, two elements L[i] and L[j] form an inversion if L[i] > L[j] and i < j . The total number of inversions for L = [3, 4, 2, 1, 5] is___
5
4
3
2
In a list L, two elements L[i] and L[j] form an inversion if L[i] > L[j] and i < j . The total number of inversions for L = [3, 4, 2, 1, 5] is___
5
4
3
2
Correct answer
5
Question 37 of 50 in the IIT Madras BS Programming, Data Structures and Algorithms using Python (PDSA) End Term paper sat on 21 Dec 2025, in the September 2025 term (Programming, Data Structures And Algorithms Using Python 18 Dec 25). It carries 4 marks.