Store non - exisiting even and odd numbers
foreach ( KeyValuePair < int , int > i in m ) { if ( i . Key % 2 == 0 ) { even . Add ( i . Key ) ; } else { odd . Add ( i . Key ) ; } } min = 1000 ; parity ( even , odd , v , 0 ) ; Console . WriteLine ( min ) ; }