Inner loop will compare the selected character with rest of characters present in the string. If a match found, then increment the freq[i] by 1. Variable min and max is used to store the count of minimum and maximum occurring character which will initially point to count of first element of freq i.e. freq[0].
Answers & Comments
Answer:
Inner loop will compare the selected character with rest of characters present in the string. If a match found, then increment the freq[i] by 1. Variable min and max is used to store the count of minimum and maximum occurring character which will initially point to count of first element of freq i.e. freq[0].