Given a positive integer n, the task is to find the nth string in the following infinite list of all possible strings over two symbols… Read More »
Given a string str of lowercase characters, the task is to remove duplicates and return a resultant string without modifying the order of characters in… Read More »
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.