function which find number
static int singleNumber ( int [ ] nums , int n ) { HashMap < Integer , Integer > m = new HashMap < > ( ) ; long sum1 = 0 , sum2 = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( ! m . containsKey ( nums [ i ] ) ) { sum1 += nums [ i ] ; m . put ( nums [ i ] , 1 ) ; } sum2 += nums [ i ] ; }