A fair coin is tossed m+n times, where m and n are positive integers, m>n. What is the probability that there are at least m consecutive heads? There are n numbers in any random order. How do I get top m numbers (m <= n) in descending order with least time complexity and most optimized? (Java code)