Dear Students ,
Welcome to the “Question of the Day” session, where we unravel the captivating world of DSA one inquiry at a time. Today, prepare yourselves for a thrilling challenge that will put your problem-solving skills to the test. Get ready to dive into the depths of algorithms and data structures!
Given a String , write a function to count the frequency of each character
in the string and return the counts in a dictionary.
For example, given a string “hello”, the function should return
{‘h’: 1 ,‘e’ : 1,‘l’: 2 ,‘o’ : 1}
Your task is to implement the function that takes string as a function and return the object.