@@ -228,8 +228,8 @@ import re
228228"""
229229 This solution makes use of python's re module i.e regular expressions
230230 Here findall method takes two parameters 1st - regualr expression, 2nd - input string
231- The regular expression simply checks for all vowels present in the input string
232- and returns them as a list.
231+ The regular expression simply checks for all vowels present in the input string
232+ and returns them as a list.
233233"""
234234print (len (re.findall(r ' [a,e,i,o,u,A,E,I,O,U ]' , input ())))
235235
@@ -273,6 +273,8 @@ for i in b:
273273print (count)
274274```
275275
276+ <hr />
277+
276278## C++ Implementation
277279
278280### [ NumVowelsPartA.cpp] ( ./C++/NumVowelsPartA.cpp )
@@ -389,7 +391,7 @@ print("Number of vowels in the string are : ",count)
389391### [ Solution by shashank] ( ./Python/Shashankvowels.py )
390392
391393``` py
392- """
394+ """
393395 * @author: Shashank Jain
394396 * @date: 25/12/2018
395397"""
@@ -554,17 +556,17 @@ dictnry = {}
554556maxCount, maxChar = 0 , ' '
555557for char in input_str:
556558 """
557- In this solution we are simply maintaining a dictionary of characters
558- in the input string as key and their count as value
559+ In this solution we are simply maintaining a dictionary of characters
560+ in the input string as key and their count as value
559561 """
560562 if char in dictnry.keys():
561563 dictnry[char] += 1
562564 else :
563565 dictnry[char] = 1
564- """
565- We check for maxCount of each character in a single loop
566- by comparing it with present maxCount, hence not iterating over the dictionary again
567- to find character with maximum count.
566+ """
567+ We check for maxCount of each character in a single loop
568+ by comparing it with present maxCount, hence not iterating over the dictionary again
569+ to find character with maximum count.
568570 """
569571 if dictnry[char] > maxCount:
570572 maxCount = dictnry[char]
@@ -591,7 +593,7 @@ for char in string:
591593 # Else initialize its frequency by 1
592594 else :
593595 characters[char.lower()]= 1
594-
596+
595597# Print the character which has the maximum frequency
596598print (" The most occouring character in the string is : " , max (characters,key = characters.get))
597599
@@ -661,7 +663,6 @@ int main()
661663 return 0;
662664}
663665```
664-
665666### [ mostFrequent.cpp] ( ./C++/mostFrequent.cpp )
666667
667668``` cpp
0 commit comments