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.
I used string array instead of character array for alphabets.So there is a contains method in string.If this methos contains this character I increment count1.If count1 equals String[] arr.length that time it has all characters that time I increment count2.Finally it returns count2 that means how many words have characters.
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 →
I used string array instead of character array for alphabets.So there is a contains method in string.If this methos contains this character I increment count1.If count1 equals String[] arr.length that time it has all characters that time I increment count2.Finally it returns count2 that means how many words have characters.