Friday, April 24, 2015

HackerRank::Algorithms::Strings::Pangrams

  we can keep a boolean array MARK where MARK[I] is true if we have already met the Ith letter and false otherwise. Now, we loop over all the letters of the string, lowercase all of them, then check the MARK array, if it's false then we mark that letter as true and increase our counter of unique letters. in the end, if the counter equals to 26 then we have met all the letters, otherwise we didn't.



No comments:

Post a Comment