count how many times each letter appears
Q) Suppose you are given a string and you want to count how many times each letter appears:
Well you build empty dictionary parse sequence of string check if character exist or not in dictionary if it's not then count it =1 if it's exist count+1
Well you build empty dictionary parse sequence of string check if character exist or not in dictionary if it's not then count it =1 if it's exist count+1
That's it :)
Comments
Post a Comment