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:::intgemstones(intarr_count,chararr){intalphbetical_array[26]={0};for(inti=0;i<arr_count;i++){inttemp_alphaArrray[26]={0};// temporary array used to find duplicate mineralsfor(intj=0;arr[i][j]!='\0';j++){// if temp_alphaArray has already a mineral, it doesn't executeif(!(temp_alphaArrray[arr[i][j]-'a'])){// used for a single mineral oncetemp_alphaArrray[arr[i][j]-'a']++;alphbetical_array[arr[i][j]-'a']++;}}}intcount=0;for(inti=0;i<26;i++){if(alphbetical_array[i]==arr_count){count++;}}returncount;}**
`
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Gemstones
You are viewing a single comment's thread. Return to all comments →
`