We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
[CLANGUAGE:::intlonelyinteger(inta_count,int*a){for(inti=0;i<a_count;i++){intcount=1;intj=0;for(j=0;j<a_count;j++){if(i!=j){if(a[i]==a[j]){count++;}}}if(count==1){// no need to check remain cases// because only one element is uniquesreturna[i];}}return0;//just mentioned any default return value}](https://)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Lonely Integer
You are viewing a single comment's thread. Return to all comments →