how can I get the average number of swaps for the followingalgorithm? assuming that the numbers are distinct, and mixedpositive and negative numbers.
![Algorithm(A[0...n-1]): while isj: if Ali] <0: else: swap (A[i], A[j])](https://d2vlcm61l7u1fs.cloudfront.net/media%2Fc49%2Fc49560ec-a08a-4ea6-88e9-80e627076a52%2Fphp5aAIe1.png)
Algorithm(A[0…n-1]): while isj: if Ali] <0: else: swap (A[i], A[j]) Show transcribed image text
Expert Answer
An answer will be send to you shortly. . . . .