C++/ptl/HashTable.hpp
// Checks if integer n is prime or not

Checks if integer n is prime or not
Checks if integer n is prime or not
bool HashTable::isPrime( int n ) const
	{
		if( n%2 == 0 ) return false;
		for( int i=3; i*i<=n; i+=2 )
			if( n%i == 0 )
				return false;
		return true;
	}
bool HashTable :: isPrime ( int n ) const { if ( n % 2 == 0 ) return false ; for ( int i = 3 ; i * i <= n ; i += 2 ) if ( n % i == 0 ) return false ; return true ; }
Checks if integer n is prime or not
Checks if integer n is prime or not