Tuesday, September 16, 2014

Holes in the text



Problem

Idea : Given a string composed of uppercase letters .You have to count the hole in the string , specifically ,  an alphabet B contains 2 hole , A contains 1 etc .

Look , only alphabet B contains 2 hole . Alphabet A , D , O , P , Q and R are have 1 . Other have no hole . The summation of hole containing each alphabet in the given string is our answer .

My Solution

No comments:

Post a Comment