Words With Duplicate Letters

Published by zatoichi49 in

Given a common phrase, return false if any individual word in the phrase contains duplicate letters. Return true otherwise.

Examples

no_duplicate_letters("Fortune favours the bold.") ➞ true

no_duplicate_letters("You can lead a horse to water, but you can't make him drink.") ➞ true

no_duplicate_letters("Look before you leap.") ➞ false
# Duplicate letters in "Look" and "before".

no_duplicate_letters("An apple a day keeps the doctor away.") ➞ false
# Duplicate letters in "apple", "keeps", "doctor", and "away".

Notes

Letter matches are case-insensitive.

Watch a quick demo on how Edabit works.