Skip to content

Tag Archives: String Duplicates

Given an array of strings arr[] of size N, the task is to print all the distinct strings present in the given array.  Examples: Input:… Read More
Given string str of lowercase alphabets and an array cost[], where cost[i] represents the cost of deletion of ith character in the given string. The… Read More
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.