Skip to content

Files

Latest commit

author
Aneta Solunska
Aug 8, 2024
b05e897 · Aug 8, 2024

History

History
This branch is 2 commits ahead of, 16 commits behind igorwojda/kotlin-coding-challenges:main.

hasrepeatedcharacter

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Aug 8, 2024
Feb 7, 2023
Feb 7, 2023

Has repeated char

Instructions

Given a string implement a function which returns true if string contains at least one repeated character, otherwise it returns false.

Challenge | Solution

Examples

hasRepeatedCharacter("abc") // false"

hasRepeatedCharacter("aabc") // true

hasRepeatedCharacter("aabcc") // true

Hints

Hint 1 Use frequency counter.