Given a string containing only letters, output the length of the longest run of consecutive alphabetical letters the word contains, where order does not matter. An example algorithm may sort the word, remove duplicates, and then output the length of the longest run.
watch -> 1 stars -> 3 antidisestablishmentarianism -> 3 backdoor -> 4 a -> 1 tutorials -> 4
antidisestablishmentarianism contains the letters
abdehilmnstr. The longest runs are
rst, both of length 3.
You may take all lowercase, all uppercase, or mixed-case letters as input, but the case cannot encode information about the word (i.e. you cannot make the first
n characters capitalized where
n is the length of the longest run).
This is code-golf, so shortest answer in bytes wins.