
We are given a random permutation of {1,2,...,n}. We perform bubble sort on it. What is the probability that after single round of bubble sort we get the right (sorted) order? Examples:
Question: What is the probability that the array is sorted after just one pass? Calculate for N=5