Non-Repeated Characters in String

Non-Repeated Characters in String

Finding Count of Characters that are not repeated in the string.

Varun Joshi's photo
Varun Joshi

Published on Jul 31, 2021

1 min read

Here is a problem I recently came with an interview. Let's see the way we can solve this using python

Problem

A data Compression software utilizes various steps to compress a string of data. One of the steps involves finding the count of characters that are not repeated in the string. Write an algorithm for the software developer to find the count of characters that are not repeated in the string.

Input : The Input consists of a string

Output : Print the non-repeated characters and the count of characters that are not repeated. if no characters are found print 0

My approach :

If you have a better way to solve this problem, do comment down below.

3a854213c52fdcfe4643cf0c6d956c74.png

 
Share this