Primality test using Rabin Miller algorithm
Algorithm implementation to find the kth largest element