1
1
mirror of https://github.com/theoludwig/programming-challenges.git synced 2024-12-08 00:45:29 +01:00
programming-challenges/challenges/first-non-repeating-character
2021-10-08 13:36:22 +02:00
..
solutions feat(solutions): add first-non-repeating-character/c/function 2021-10-08 13:36:22 +02:00
test feat: rewrite programming-challenges CLI (#3) 2021-06-09 20:31:45 +02:00
README.md feat(solutions): add `is-prime-number/cs/function 2021-09-10 22:37:50 +02:00

first-non-repeating-character

Created by @Divlo on 15 November 2020.

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 ("").

Source

First non-repeating character - Codewars

Examples

See the test folder for examples of input/output.