About 1,200,000 results
Open links in new tab
  1. Find all duplicate characters in string in Python | GeeksforGeeks

    Nov 20, 2024 · In this article, we will explore various methods to find all duplicate characters in string. The simplest approach is by using a loop with dictionary. Using Loop with Dictionary. …

  2. Find duplicate characters in a String and count the number of ...

    You need iterate over each character of your string, and check whether its an alphabet. You can use Character#isAlphabetic method for that. If it is an alphabet, increase its count in the Map. …

  3. Find All Duplicate Characters in a String using Python

    Learn how to find all duplicate characters in a string using Python with this step-by-step guide and practical examples.

  4. Java Program To Count Duplicate Characters In String (+Java 8 …

    Mar 10, 2020 · In this article, We'll learn how to find the duplicate characters in a string using a java program. This java program can be done using many ways. But, we will focus on using …

  5. Program to find the duplicate characters in a string - Java

    Jan 8, 2025 · In 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 …

  6. 5 Best Ways to Find Duplicate Characters in a Python String

    Feb 27, 2024 · This code snippet defines a function find_duplicates that takes a string as input and returns a list of duplicate characters. It uses two nested loops to compare each character …

  7. Print all the duplicate characters in a string - GeeksforGeeks

    Jul 30, 2024 · Given a string S, the task is to print all the duplicate characters with their occurrences in the given string. Example: Explanation: g occurs 2 times in the string, k occurs …

  8. Counting repeated characters in a string in Python

    May 23, 2017 · For counting a character in a string you have to use YOUR_VARİABLE.count('WHAT_YOU_WANT_TO_COUNT'). If summarization is needed you …

  9. Java 8 - Count Duplicate Characters in a String - Java Guides

    In this guide, we will explore different ways to count duplicate characters in a string using Java 8 features. Counting duplicate characters is a common task in text processing, and with the …

  10. How to detect duplicate letters in a string in Python - Educative

    One simple way to detect duplicate letters in a string is to use a loop to iterate over each letter and check if it appears more than once. # Initialize an empty list to store duplicate letters. …

Refresh