Print all the duplicates in the input string. Write an efficient C program to print all the duplicates and their counts in the input string Algorithm: Let input string be “geeksforgeeks” 1: Construct character count array from the input string. count['e'] = 4 count['g'] = 2 count['k'] = 2 …… 2: Print all the indexes from the constructed array which have value greater than 0. Solution # include
Read full article from Print all the duplicates in the input string. | GeeksforGeeks
No comments:
Post a Comment