Implement a method for finding such a prime by using the


Problem

The hash table dictionary implementation requires that we find a prime number between a number M and a number 2M. Implement a method for finding such a prime by using the sieve algorithm. In this algorithm, we allocate a 2M cell Boolean array A, such that cell i is associated with the integer i. We then initialize the array cells to all be "true" and we "mark off all the cells that are multiples of 2, 3, 5, 7, and so on. This process can stop after it reaches a number larger than √2M.

 

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Implement a method for finding such a prime by using the
Reference No:- TGS02634593

Expected delivery within 24 Hours