Here, rand(1, n) returns a uniformly random integer between 11 and nn inclusive. Let's denote the probability that the permutation generated by this algorithm is pp by p(p)p(p). Find a permutation p1p1 such that p(p1)p(p1) is maximum possible and a permutation p2p2 such that p(p2)p(p2) is minimum possible.
Answers
Answered by
1
isisjykdhlti se ofwjyduldeuti
Similar questions