Inserts the prime factor in the Hash Map if not present If present updates it 's frequency
public static HashMap < Integer , Integer > insertPF ( HashMap < Integer , Integer > primeFact , int fact ) { if ( primeFact . containsKey ( fact ) ) { int freq ; freq = primeFact . get ( fact ) ; primeFact . replace ( fact , ++ freq ) ; } else { primeFact . put ( fact , 1 ) ; } return primeFact ; }