Program to find the duplicate characters in a stringExplanationIn this program, we need to find the duplicate characters in the string. To find the duplicate character from the string, we count the occurrence of each character in the string. If count is greater than 1, it implies that a character has a duplicate entry in the string. In above example, the characters highlighted in green are duplicate characters. Algorithm
SolutionPythonOutput: Duplicate characters in a given string: r e t s i COutput: Duplicate characters in a given string: r e t s i JAVAOutput: Duplicate characters in a given string: r e t s i C#Output: Duplicate characters in a given string: r e t s i PHPOutput: Duplicate characters in a given string: r e t s i Next Topic# |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India