Dataset Viewer
text
stringclasses 2
values |
---|
### Human: List the five inversions of the array <2,3,8,6,1> ### Assistant: The five inversions are (2, 1), (3, 1), (8, 6), (8, 1), and (6, 1). |
### Human: What array with elements from the set {1,2,….,n} has the most inversions?How many does it have? ### Assistant: The n-element array with the most inversions is ⟨n, n − 1, . . . , 2, 1⟩. It has n(n-1)/2 inversions. |
No dataset card yet
- Downloads last month
- 10