1
1
mirror of https://github.com/theoludwig/programming-challenges.git synced 2024-11-09 22:08:58 +01:00
programming-challenges/challenges/first-non-repeating-character/README.md

20 lines
672 B
Markdown
Raw Normal View History

# first-non-repeating-character
Created by [@Divlo](https://github.com/Divlo) on 15 November 2020.
2020-12-09 12:42:12 +01:00
## Instructions
Write a function that takes a string input, and returns the first character that is not repeated anywhere in the string.
For example, if given the input `'stress'`, the function should return `'t'`, since the letter `'t'` only occurs once in the string, and occurs first in the string.
If a string contains all repeating characters, it should return an empty string (`""`).
2020-12-09 12:42:12 +01:00
## Source
[First non-repeating character - Codewars](https://www.codewars.com/kata/52bc74d4ac05d0945d00054e/)
2020-12-09 12:42:12 +01:00
## Examples
See the `test` folder for examples of input/output.