[Question]
  [
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.
## Test Cases
```
watch -> 1
stars -> 3
antidisestablishmentarianism -> 3
backdoor -> 4
a -> 1
tutorials -> 4
```
For example, `antidisestablishmentarianism` contains the letters `abdehilmnstr`. The longest runs are `lmn` and `rst`, both of length 3.
## Notes
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](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so shortest answer in bytes wins.
  
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), ~~10 9 8 7~~ 6 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
OṬṣ0ZL
```
**[Try it online!](https://tio.run/##y0rNyan8/9//4c41D3cuNojy@f//f2JeSWZKZnFqcUliUk5mcUZual5JYlFmYl5mcS4A "Jelly – Try It Online")**
9 was using [Sok's method](https://codegolf.stackexchange.com/a/168433/53748): `ṢQẆẇƇØaṪL`
### How?
```
OṬṣ0ZL - Link: list of (single-case) characters  e.g.  codegolf
O      - ordinal (vectorises)           [99,111,100,101,103,111,108,102]
 Ṭ     - untruth (1s at those indices)  [0,0,0,...,1,1,1,1,1,0,0,0,0,1,0,0,1]
       -                                 ^         ^       ^         ^     ^
       -                   i.e. indices: 1        99     103       108   111
   0   - literal zero
  ṣ    - split at                       [[],[],[],...,[1,1,1,1,1],[],[],[],[1],[],[1]]
    Z  - transpose                      [[1,1,1],[1],[1],[1],[1]]
     L - length                         5
```
[Answer]
# [R](https://www.r-project.org/), ~~44~~ 43 bytes
Works on an array of lowercase characters. Edit: changed it from testing True values to multiplying by the T/F for a byte.
```
function(x,r=rle(letters%in%x))max(r$l*r$v)
```
[Try it online!](https://tio.run/##hY4xDsIwDEVnOEWHVklQFwRrDpO2qWrhJsh2S24fIgaEAhKe3/P7lGeb5y2MAjHo1JMl9Bq9iCfuIHTJmNUlTS2eqN1NnrVHzUJ8RxCtHk7GRfVKGWOaQzlrm/OxglgccQVdasgFgQnYF3hA4GX1oWjgAvD6dn@JgxtvU4xUBa5fgX8zZZNYgvg59fUoPwE "R – Try It Online")
Does a run length encoding on letters that are in the supplied characters then return the max value for the trues.
[Answer]
# [APL (Dyalog Classic)](https://www.dyalog.com/), ~~10~~ 9 bytes
-1 byte thanks to H.PWiz
```
≢⍉↑⊆⍨⎕a∊⍞
```
[Try it online!](https://tio.run/##JY3NSsNQEIX3eYrZjUILFrtyl/5Ag20CTcT1JeaWYJobbm4RKd1JbKK36MKlgl35AiIUfJl5kTjq7pz5Ps6IIute3YpMLbpxJsoyjVvavaSKqqcTh7b3sqV6T7am6pmaiuwHU0Hbhuxby7iVLJLd9ejxGzdr7CADZEdz@ERq9ky@uMcaJQLZVzArnUOslkWWmAQKrRZaLCHNjQIBcpXHJlU5lApuEohFDiYpDaTGMfxpzaNUv2uOkuzhDNU10sMdSpFm/PDAWG8cvHSj4QQN9BwMI3cecjx10PUjb@SFYz4Npl44mY19hp7re@Hs3xi4w/NREMy59Z2jDrp4/DcSXUQBi9Pfof4P "APL (Dyalog Classic) – Try It Online")
`⍞` inputs a string
`⎕a` is the uppercase English alphabet
`⎕a∊⍞` a boolean length-26 vector - which letters occur in the string?
`⊆⍨` form vectors of consecutive 1s
`≢⍉↑` mix into a matrix, transpose, and return its height - effectively, find the length of the longest vector of 1s
[Answer]
# [Perl 6](https://perl6.org), 41 bytes
```
{max values bag .ords.sort.squish Z-0..*}
```
[Test it](https://tio.run/##TY9BTgMxDEX3OYVVVQjKNJRSdTMq4hCsQCw8SaARmWSInbao6snYcbEhaUBil/z//rc9mOjWYyIDu7VUrRD9J1yooA1sxmOPB9ihS4agwzeQIWqSFCJL@kiWtvA0X0g5O4059MCGGDbgrDf0/SX3BX6etYtm@ZJry4THTLRicOjhuuI3sMzea4i/8fk9TK0fEjcwNYfBKDYajgLAEpSlLqt79c9uYFLFc/hPnYjTuEdW26LeCmKMVJ53Aj1bbSlPw87lG3rjs2nRW@or0aF61yHvlH8rgbWBE4dMuXPL6gc "Perl 6 – Try It Online")
## Expanded:
```
{  # bare block lambda with implicit param $_
  max       # find the max
    values  # get the values from the following Bag (repeat counts)
      bag   # find the repeats
          .ords.sort.squish # get the unique ordinals (method call on $_)
        Z-                  # zip subtract with
          0 .. *            # Range starting with 0
}
```
Given `'stars'`, `.ords.sort.squish Z-0..*` would return `(97,113,113,113)`
[Answer]
# [Haskell](https://www.haskell.org/), 35 bytes
```
f[]=0
f s=1+f[c|c<-s,elem(succ c)s]
```
[Try it online!](https://tio.run/##FcrBCsMgEATQe75ikR5amkJ7r18iOWw2iktWDa6hl/67tYdhGN5E1N2L9B7cYp9TALWve3D0pfdDZy8@XfUkArrp0sU688FG0cxGG1YdjbnxxurHXoU1Jp@HMGbWNHhF2rdS6v850s5WBoqaZUrIGSwclXODCyQ8IID0Hw "Haskell – Try It Online")
# [Haskell](https://www.haskell.org/), 50 bytes
```
f s=maximum$scanl(\x c->sum[x+1|elem c s])0['a'..]
```
[Try it online!](https://tio.run/##FcpBCsIwEAXQvacYQqGKWvQA9SK1i2makqEzackk2IV3j3Hx@Xze96irYy5lAe0FD5IsjVoMfH4fYO8vzTIc1@fXsROwoOPlMbTYdt1YuB/MB5P15mY0YdTaGBLNpK7uiUm9uFCFMJBK5QntOm9b/D9rUk5bRVYzngQpQA97pJCgAcEdFuDyAw "Haskell – Try It Online")
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), 51 bytes
The case of the input string doesn't matter.
```
s=>(g=_=>s&&1+g(s&=s*2))(Buffer(s).map(c=>s|=1<<c))
```
[Try it online!](https://tio.run/##dY69DoIwFEZ3n4IwkFYjBGWkDL6IuZQWqv0hvUUX3712wAXDfM538j3gBci9msPZukFEySKyjozszjosivo0EiwYHi@UktsipfAEaWlgJjwJH1a3Lac0cmfRaVFqNxJJ8jcEPuWUZlWV1YcNxAAeV3jdQrBBDQpFknqtcDLCJl2BVWj2Nj3w5@CcX3nz19x7EpbgUlv/3jTxCw "JavaScript (Node.js) – Try It Online")
### How?
We first convert the input string into a bitmask of encountered letters with:
```
Buffer(s).map(c => s |= 1 << c)
```
The bitwise shift is processed with an implicit modulo 32.
Example:
```
"feedback" --> 100001111110
               kjihgfedcba-
```
We then 'reduce' runs of consecutive 1's in the bitmask by repeatedly AND'ing it with a left-shifted copy of itself until all bits are cleared:
```
0100001111110 AND 1000011111100 --> 0000001111100
0000001111100 AND 0000011111000 --> 0000001111000
0000001111000 AND 0000011110000 --> 0000001110000
0000001110000 AND 0000011100000 --> 0000001100000
0000001100000 AND 0000011000000 --> 0000001000000
0000001000000 AND 0000010000000 --> 0000000000000
```
The number of consecutive letters in alphabetical order is the number of iterations of the above process. Hence the recursive function:
```
g = _ => s && 1 + g(s &= s * 2)
```
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), 9 bytes
```
le}#G.:S{
```
Input is assumed to be a lower case string. Try it out online [here](https://pyth.herokuapp.com/?code=le%7D%23G.%3AS%7B&input=%22stars%22&debug=0), or verify all the test cases at once [here](https://pyth.herokuapp.com/?code=le%7D%23G.%3AS%7B&test_suite=1&test_suite_input=%22watch%22%0A%22stars%22%0A%22antidisestablishmentarianism%22%0A%22backdoor%22%0A%22a%22%0A%22tutorials%22&debug=0).
```
le}#G.:S{Q   Q=eval(input()), G=lowercase alphabet. Trailing Q inferred.
        {Q   Deduplicate input string
       S     Sort it
     .:      Take all substrings (these are generated in length order)
  }#G        Filter out those that aren't found in the alphabet
le           Find the length of the last remaining element
```
[Answer]
# [MATL](https://github.com/lmendo/MATL), 10 bytes
```
2Y2imY'*X>
```
Input is in lowercase.
[Try it online!](https://tio.run/##y00syfn/3yjSKDM3Ul0rwu7/f/WS0pL8oszEnGJ1AA) Or [verify all test cases](https://tio.run/##FcpLCoAwDATQvRcJuOwBXHkEF3Zn@oEGmxaaiMevcTEMwxtGrfOazjtiD@u5zf2Y8KLGAguI4hBrbEqJJNsOlaRwbiaEjYSNA8Y79T7@p0Uf7YZV4AM).
This uses a mix of [@Sundar's](https://codegolf.stackexchange.com/a/168431/36398) (old) and [@ngn's](https://codegolf.stackexchange.com/a/168430/36398) approaches.
### Explanation
Consider input `'tutorial'` as an example.
```
2Y2   % Push predefind literal 'abcdefghijklmnopqrstuvwxyz'
      % STACK: 'abcdefghijklmnopqrstuvwxyz'
i     % Push input
      % STACK: 'abcdefghijklmnopqrstuvwxyz', 'tutorials'
m     % Ismember: true for letters present in the input
      % STACK: [1 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 1 1 1 1 0 0 0 0 0]
Y'    % Run-length encoding
      % STACK: [1 0 1 0 1 0 1 0 1 0], [1 7 1 2 1 2 1 2 4 5]
*     % Multiply, element-wise
      % STACK: [1 0 1 0 1 0 1 0 4 0]
X>    % Maximum. Implicitly display
      % STACK: 4
```
[Answer]
# [Python 3](https://docs.python.org/3/), 55 bytes
```
f=lambda s:s and-~f({*s}&{chr(ord(c)+1)for c in s})or 0
```
[Try it online!](https://tio.run/##HYq7CsIwAEVn/YpMJvEBilvBIX1Ag31Ak@IgDrEltKBpSbpIqb8eE5fL4Zw7fqZuUGdr5eUl3s9WABMYIFR7@Eo0b82ymZtOo0G3qMG7E5aDBg3oFTALdni0Xhgv7vBGeJTCPYCMk4p5IAWnMWWJE2FGWZonhUuUFJTlvockusZlWf2/fnjNS9czBh/BejXqXk1IIoOx/QE "Python 3 – Try It Online")
---
# [Python 2](https://docs.python.org/2/), 58 bytes
```
f=lambda s,c=99,r=0:c and max(r,f(s,c-1,-~r*(chr(c)in s)))
```
[Try it online!](https://tio.run/##HY09C4MwGITn9le8W5ISoe2m4BA/wFA/wKR0KB3SiCjUKNGhXfrXbexy3N1zcNNn6UZzXtc2fKnh2SiYqQ59n9rwGGhQpoFBvbGlLXbAO1Hvaw9YdxZr0huYCSFrO1qYwaU7ujEZZ4gCEpLVYjOslDzhInVFlHORFWnpEGclF8XGIxZfkqqq/9tN5FVWjucCPYL9brK9WcCdk/UH "Python 2 – Try It Online")
---
# [Python 2](https://docs.python.org/2/), 63 bytes
```
n=t=0
for c in input():n|=2**ord(c)
while n:n&=n/2;t+=1
print t
```
[Try it online!](https://tio.run/##DcJBCoMwEAXQfU4RXIjahTVLZQ6TakoG9Cckv5RC75728fKHMcG1BqHczTMVu1vFf35xGFd8xU1TKsewj@Yd9QwWK3rB7DbeZDG5KGjZWudBPbSGSv84tcYrgL6oh9ar@wE "Python 2 – Try It Online")
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 6 bytes
Saved 1 byte thanks to [Adnan](https://codegolf.stackexchange.com/users/34388/adnan): taking the contiguous substrings, then sorting by length (`Œ...é`) \$\to\$ using the powerset built-in instead (`æ`).
```
êæAÃθg
```
[Try it online!](https://tio.run/##MzBNTDJM/V9TVmmvpKBrp6BkX/n/8KrDyxwPN5/bkf7ftvZ/eWJJcgZXcUliUTFXYl5JZkpmcSqQl5STWZyRm5oHFM9MzMsszuVKSkzOTsnPL@JK5CopLckHCucUAwA "05AB1E – Try It Online")
### Also 6 bytes
Saved 2 bytes, again thanks to [Adnan](https://codegolf.stackexchange.com/users/34388/adnan): using `ASå` instead `êÇ¥Θ`, thus also removing the need to increment the maximum at the end. See [the revision history](https://codegolf.stackexchange.com/revisions/168458/2) to compare the beviours of the two methods.
```
ASåγOà
```
[Try it online!](https://tio.run/##MzBNTDJM/V9TVmmvpKBrp6BkX/nfMfjw0nOb/Q8v@G9b@788sSQ5g6u4JLGomCsxryQzJbM4FchLyskszshNzQOKZybmZRbnciUlJmen5OcXcSVylZSW5AOFc4oB "05AB1E – Try It Online")
### How those works
I like challenges like this one which lead to a variety of different approaches. 
```
êæAÃθg | Full program.
ê      | Push a sorted and without duplicates version of the input.
 æ     | Powerser.
  AÃ   | Keep those that also occur in the lowercase alphabet.
    θg | Take the length of the last one. θ and ` can be used interchangeably.
-------+-------------------------------------------------------------------------------
ASåγOà | Full program.
A      | Push the lowercase alphabet.
 S     | Listify it (i.e. convert it to a sequence of characters).
  å    | Replace each char in the alphabet by 1 if its in the input, else by 0.
   γ   | Split into chunks of equal adjacent elements.
    O  | Sum each part.
     à | Extract the maximum of this list. Again, à and Z can be used interchangeably.
```
[Answer]
# TSQL (Microsoft SQL Server), 206 bytes
```
WITH C AS (SELECT 1p,SUBSTRING(@,1,1)c UNION ALL SELECT p+1,SUBSTRING(@,p+1,1)FROM C WHERE p<LEN(@)),R AS(SELECT c d,1r FROM C UNION ALL SELECT c,r+1FROM R JOIN c ON ASCII(d)+1=ASCII(c))SELECT MAX(r)FROM R
```
For input, use the following `DECLARE` statement before the code:
```
DECLARE @ varchar(200) = 'propinquities';
```
It is expected that input is all the same case (upper or lower doesn't matter, but mixed case would not work).
**Ungolfed:**
```
DECLARE @data varchar(200) = 'propinquities'
;WITH CTE AS (
    SELECT
        1 as CharacterPosition,
        SUBSTRING(@data,1,1) as Character
    UNION ALL
    SELECT
        CharacterPosition + 1,
        SUBSTRING(@data,CharacterPosition + 1,1)
    FROM
        CTE
    WHERE CharacterPosition < LEN(@data)
), Runs AS
(
    SELECT Character, 1 rc
    FROM CTE
    UNION ALL
    SELECT b.Character, rc + 1
    FROM Runs r
    JOIN CTE b ON ASCII(r.Character) + 1 = ASCII(b.Character)
)
SELECT max(rc)
from runs
```
**Explanation:**
Splits the string into a a row for each character (adapted from <https://stackoverflow.com/a/27623321/1474939>) in the `CTE` cte.
Then, finds runs of consecutive letters by converting to the ASCII code in the `Runs` cte.
Lastly, it picks the largest run and reports back in the select statement.
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~58~~ 56 bytes
*Saved 2 bytes thanks to @gastropner*
Uses the same approach as [my Node.js answer](https://codegolf.stackexchange.com/a/168434/58563). The case of the input string doesn't matter.
```
m,i;f(char*s){for(i=0;*s?m|=1<<*s++:(i++,m&=m*2););s=i;}
```
[Try it online!](https://tio.run/##XY3LDoIwFET3fsUNRtMCPlBXFvRbagtyI21Nb4kL9NuxCzHRZFZnTmbU6qrUOEerul7XUFLQ6NbtaTQ5ioapVvqU@NA4z7DaipTO5lkVZZlSlh0ZZllulpVJd1xwQRWK14g2gJFoGYdhBnD3ETQsWWj4TZLHFiBWDxlUm/AcNhsoJkhBevrA/QSlDaiR6lheOqTW1DZqKC2S@XcvUt20c/7DD9@N/6fQBxc3uvg2iVzMXuMb "C (gcc) – Try It Online")
### Commented
```
m,                   // m = bitmask of encountered letters
i;                   // i = counter of max. consecutive letters
f(char *s) {         // f = function taking the input string s
  for(               // main loop:
    i = 0;           //   start with i = 0 and assume m = 0 on first call
                     //   (it is forced back to 0 when the program terminates)
    *s ?             //   if we haven't reached the end of the string:
      m |= 1 << *s++ //     update m by setting the appropriate bit for this character
                     //     (with implicit modulo 32) and advance the string pointer
    : (              //   else:
        i++,         //     increment i
        m &= m * 2   //     'reduce' runs of consecutive 1's in m by AND'ing it with a
      );             //     left-shifted copy of itself (e.g. 11101 & 111010 -> 11000;
                     //     11000 & 110000 -> 10000); we stop when m = 0
  );                 // end of for()
  s = i; }           // return i
```
[Answer]
# [C (gcc)](https://gcc.gnu.org/), 100 bytes
```
c,o,u;n(t,e,r)char*r,*e,*t;{for(u=0,e=t;c=*t++;u=u<o?o:u)for(o=0,r=e;*r;*r++-c||(c++,r=e,++o));o=u;}
```
[Try it online!](https://tio.run/##RU5LasMwEF03pzAqxvqMoaVdRRW@RFbGG0WWY9FYKtKILpKc3ZWTQmAY5n0Z056MWVcDAbL0FMFCZGbWkUfgFjjKyxQizeoNrEJpFEchZFb5K3Rhn9kmhiJGZSWPZYRozfVKjRAbB0IExmRQWd7W19FOztvqQHuw7Cc6jxMlng6kTgNhlarqserum9aGDZ5AD572rDxl2@3omqnZN9gwuVu085Rddi8HSn41mplA9c7uMKGOqcCPB9Qe3eiSLfTx7NK8WF8MTnuXlqfrqM33GEIszOd/7tmIGUNJnNNDva1/ "C (gcc) – Try It Online")
# Explanation
```
c,o,u;n(t,e,r)    // setup, function declaration
char*r,*e,*t;{    // K&R style
 for(u=0,e=t;     // initialize global maximum u to 0, write string start to e
 c=*t++;          // look at every character in the string
 u=u  <o?o:  u)   // funny face
  for(o=0,r=e;*r; // initialize local maximum o to 0, look at entire string again
  *r++-c||(c++,   // equal character found, search for next one
   r=e,++o));     // reset local pointer, increment local maximum
o=u;}             // return maximum character streak
```
[Try it online!](https://tio.run/##XZLBcpswEEDP5St26LhGIE/SSU6hjD@gt05OHl9ksRiNQeuKVRM3ybe7i03spDqApGWf3q6wi621x6PVpGPpM9aogwIZNzcwIMe9hiZ6y4481Gg7E8w4T2xrQh50jjrn8mVK@PntFwx86DCBhkIWq1uNFZcwhZ137Ezn/iJsO9qYDnrz7PrYQwQmuNXwFByjIILzW3mZwGNAcLbKuSjOpHdcR7QDw4B/MBxgFDKWMcgxwO07JYFYRYAftKQHgKjOqVKSP0BjrKBPqiSqocIyD@V/ph3ZD6I0iV7O9uzCxdhsjfNCzENRLOzra2aLQp9PxN9RMFfJhqKvtbTYBNuOCuDxmYH8aASioouClLr0LqDcxiSzJ@eFoUXTBuzF4bNlQlUs3@DjOBE4Bn@p5Koi8mh2x681Ns4jPGYrjWovBXGTpT5bp7NhnSqoYFbD8vTMZlatfapX2mcrJb8MLsbJct7MH@Y8V2XSSyMy9ZJ8eczSJ8O2TTV8V6fleK2DLO/OSyMdrN2Asr3p3NCO5ZjgjHdDf/1qY@yuJgqycz/lXYkcmSSjG87Rt@M/ "C (gcc) – Try It Online")
[Answer]
# [MATL](https://github.com/lmendo/MATL), ~~12~~ 10 bytes
```
91:wX-dX>q
```
[Try it online!](https://tio.run/##y00syfmf8N/S0Ko8Qjclwq7wv0vIf/VwxxBnD3UudUe/EE8Xz2DX4BBHJx/PYA9fV78QxyBPRz/PYF@gNFA4KBhIOzk6e7v4@weBdABxSGiIP1CRT7A6AA "MATL – Try It Online")
### Explanation:
`91:` - Create the list of numbers from 1 to 91. 91 is character '[', which comes after 'Z'.
So this effectively creates the list of all characters from '\x1' to '['. (We mainly want
those in the range ['A'-1 : 'Z'+1], but having the rest doesn't hurt, and needs less bytecount.)
`w` - Implicit input, bring input to top of stack (assume 'TUTORIALS') 
`X-` - Set difference. This leaves only the characters that were *not* found in the 
input string, in their original order ('stable'). Stack: `' !"#$%&'()*+,-./0123456789:;<=>?@BCDEFGHJKMNPQVWXYZ['` 
`d` - Difference between successive elements in that list. Stack: `[1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 2 1 2 1 2 1 5 1 1 1 1 1]`
`X>` - Get the maximum of those differences i.e. the max number of consecutive alphabets missing from the set difference.
`q` - Decrement to get actual character count
---
Older: 
### 12 bytes
```
Sud1=Y'*X>sQ
```
[Try it online!](https://tio.run/##y00syfmf8D@4NMXQNlJdK8KuOPC/S8h/9fLEkuQMdS71xLySzJTM4tTiksSknMzijNzUvJLEoszEvMziXKA0ULioGEgnJSZnp@TnF4F0AHFJaUk@UFFOsToA "MATL – Try It Online")
[Answer]
# [K (ngn/k)](https://bitbucket.org/ngn/k), ~~17~~ 15 bytes
```
#1_{x^x^x+1}\-:
```
[Try it online!](https://tio.run/##NYzLDoIwFET3foWpLjTKotFV76cAyuVRaQpt0l4jhOCv19aEzOrMmYzOzMuEIMWBP5fpEXPha5GJQGI55vPXCbmfoLIaTpVENcAEM7hzue4oZx@kpmfAywSe0HkGtz@gIdUq38WyHpTvx85ErdAoP26bGhvdWusY3BNfGW5X9CYbx4NPKvwA "K (ngn/k) – Try It Online")
`-` is there only to convert the chars to numbers (it doesn't matter if they are negative)
`{` `}\` applies a function until convergence, preserving intermediate results
`x+1` add 1 to each number in `x`
`^` "without" - the list on the left without elements that occur in the list on the right
`x^x^x+1` means `x` intersected with `x+1`
`1_` drop the first element
`#` count
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), 54 bytes
```
O`.
D`.
.
$&$&¶
T`l`_l`¶.
(.)¶\1
$1
.(.+)
$.1
O#^`
1G`
```
[Try it online!](https://tio.run/##DYtBCsMgFAX37xq1wVD44B0KXWbTZUn9SYR8ahSipTfzAF7MupjFDMzpsgRuV/2wbbKEe4egBjXUgqf19u1tLQRNYy0vA2VAmm4jFBlMl9nC9LP9OK87UuYzgUOWTZLrtnhJ@@FC78JB0oGF188W4wlG/ubYs09/ "Retina 0.8.2 – Try It Online") Link includes test cases. Explanation:
```
O`.
```
Sort the letters into order.
```
D`.
```
Deduplicate the letters.
```
.
$&$&¶
```
Duplicate each letter on separate lines.
```
T`l`_l`¶.
```
Decrement the first of each pair.
```
(.)¶\1
$1
```
If this now matches the previous character, join them back together.
```
.(.+)
$.1
```
Count the lengths of all the runs.
```
O#^`
```
Sort them in reverse numerical order.
```
1G`
```
Take the first (largest).
[Answer]
# J, 16 bytes
*-7 bytes thanks to FrownyFrog*
```
[:>./a.#;._1@e.]
```
[Try it online!](https://tio.run/##y/qvpKeepmBrpaCuoKNgoGAFxLp6Cs5BPm7/o63s9PQT9ZSt9eINHVL1Yv9rcqUmZ@QrGCrYKqQpqJcnliRnqEOEjCFCxSWJRcWoQol5JZkpmcWpQKmknMzijNzUPKCizMS8zOJcqEoTiMqkxOTslPz8InUuEPgPAA "J – Try It Online")
## explanation
```
[: >./ a. #;._1@e. ]    
       a. (    )e. ]    is the ascii alphabet an element of the input:
                        this will transform the alphabet into a 1-0 array,
                        the ones representing the letters in the input
          #;._1@        split that 1-0 list up into pieces, using 0
                        as the delimiter, and transforming each chunk
                        into its length. now we have a list of ints
[: >./                  take the max 
```
[Answer]
# [C (gcc)](https://gcc.gnu.org/), 98 92 bytes
Thanks to Jonathan Frech for the suggestions.
Uppercase-only.
```
f(char*s){int a[99]={0},i,j,k=j=i=0;for(;*s;a[*s++]++);for(;i<99;j=!!a[i++]*++j,k=j>k?j:k);}
```
[Try it online!](https://tio.run/##JY27DoIwGIV3n6JiTHrT6Ii1GIwmNlEGYSMMTRH9QdGAuhCevQJuJ9@5mdnVGDuB0tw/6QWt63cKz/nNsxk2N13RmjRQvpGOXTeRzaLlwHNeyFyCXIjsWWFBa6FjWjOWMEb@CNauK3I5HusYOk4ZGzpesclXBRGt7ScfGko8bFdXw/szRGmnvwQ1I4Qgw73hLQl6VV0sw840dTga8DdeJoSIUWutH0Rqp8J9GPnbowoPp30Q@WflByo8/QA "C (gcc) – Try It Online")
[Answer]
# [Japt](https://github.com/ETHproductions/japt) `-h`, 9 bytes
Case insenstive, takes input as a string or an array of characters.
```
;CôkU mÊn
```
[Try it](https://ethproductions.github.io/japt/?v=1.4.6&code=O0P0a1Ugbcpu&input=InR1dG9yaWFscyIKLWg=) or [run multiple tests](https://ethproductions.github.io/japt/?v=1.4.6&code=O0P0a1UgbcpuCmcxbg==&input=Wwoid2F0Y2giCiJzdGFycyIKImFudGlkaXNlc3RhYmxpc2htZW50YXJpYW5pc20iCiJiYWNrZG9vciIKImEiCiJ0dXRvcmlhbHMiCiJhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5eiIKIiIKIlVQUEVSQ0FTRSIKIjgiCl0KLW1S) (the second line serves as a replacement for the `-h` flag so the flag can be used to process multiple inputs instead)
---
## Explanation
```
              :Implicit input of string/array U
;C            :The lowercase alphabet
  ô           :Partition at characters returning truthy
   kU         :  Remove all characters in U from the current letter
              :  This will return a non-empty string (truthy) if the current letter ISN'T in U
     m        :Map
      Ê       :  Length
       n      :Sort
              :Implicitly output the last element in the array
```
[Answer]
## Perl 5, 68 bytes
```
$"=<>;map{$"=~/$_/i&&++$$_||last for$_..z;$.=$$_ if$$_>$.}a..z;say$.
```
[Try it online](https://tio.run/##K0gtyjH9/19FydbGzjo3saAayKrTV4nXz1RT09ZWUYmvqclJLC5RSMsvUonX06uyVtGzBYoqZKYBSTsVvdpEkGBxYqWK3v//iU7JKalp6RmZWdk5uXn@BYVFxSWlZeUVlVX/8gtKMvPziv/r@prqGRgaAAA).
Ungolfed:
```
use feature 'say';
my $s = <>;
my $r;
for ('a' .. 'z') {
    my $c = 0;
    for ($_ .. 'z') {
        last if $s !~ /$_/i;
        $c++;
    }
    $r = $c if $c > $r;
}
say($r);
```
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~66~~ ~~65~~ 63 bytes
Assumes input only contains lowercase letters. First, it loops over the string and sets bits in an integer according to which letters are seen. Next, it counts the longest streak of 1 bits in the integer.
Edit: `a` is global, so will be initialised to 0 at first call. The second loop makes sure it is reset to 0 before returning. Therefore, we can avoid resetting it manually.
```
a,l;f(char*s){for(l=0;*s;)a|=1<<*s++-97;for(;a;l++)a&=a*2;s=l;}
```
[Try it online!](https://tio.run/##PY3NbsIwEITP9VNYkUB2fqTSS1WZ8CRcNnacuDg29RpogTx7aiIlt535Zmdk1Uk5TVBaoZnsIeTIH9oHZut3kaPg8Kx3@32ORVF9fYoXESBsUXDY1pB/CKytGKerN4p2cwFNDeRB3s7BuKhZtkFaHehGHV1WUiypZsi5ICMhidMBjGNzvmPZDaLsswRfAiMEXAS4aJTBNpmNNdgPrUvYgDM4LJkG5El5H9af5bivTiNVq7vefJ/s4Pz5J2C8XG@/f2siXqJPtXYeHqd/ "C (gcc) – Try It Online")
[Answer]
## Perl 5, 62 + 2 (`-nF` flag) = 64 bytes
```
$c[ord lc$_]=1for@F;$y[y///c]++for"@c "=~/((1 )+)/g}{say@y/2|0
```
[Try it online](https://tio.run/##DchLCsMgEADQq0hwkSDpaCGrEnCVXU8QQrHGtgNGg7qRfo7ead/y7S75gYjbOaaVecsvy6huMenpxOtcAcAuQvyj0ZY14wfaVrFOdHB/P7OpusLxJYlMKLhidrmYq8f82FwoJqEJmLdv3AvGkKk/DwepJPVh@gE).
## Perl 5, 68 bytes
```
<>=~s/./$c[ord lc$&]=1/gre;$y[y///c]++for"@c "=~/((1 )+)/g;say@y/2|0
```
[Try it online](https://tio.run/##BcHRCoMgFADQ932FhIxC1rVBT@XoB/YF0YMz1y6YhtcXYfTpc@ccNrq@lPGhToIWuJlDXJkz/LqoDrZoB57nDABmEeIdYjUZVqkT6rpjjWhgG0jnKcP9K0vRPuGKZCnpl0P67NYnHVF7pP3yC0fC4Kncnn0rO/kH).
[Answer]
# [SQLite](https://sqlite.org/lang.html) 265
```
WITH w AS(SELECT'a'w),n AS(SELECT 1 n UNION ALL SELECT n+1 FROM n LIMIT(SELECT length(w)FROM w)),l AS(SELECT substr(w,n,1)l FROM n,w)SELECT max(v)FROM(SELECT min(n)v FROM(SELECT*FROM l,n EXCEPT SELECT l.l,unicode(l.l)-unicode(b.l)d FROM l,l b WHERE d>0)GROUP BY l);
```
Ungolfed:
```
WITH w AS (SELECT 'antidisestablishmentarianism' w)
   , n AS (SELECT 1 n
           UNION ALL
           SELECT n+1 FROM n
           LIMIT (SELECT length(w) FROM w) )
   , l AS (SELECT DISTINCT substr(w,n,1) l FROM n,w ORDER BY l)
   , d AS (
           SELECT l,n FROM l,n
           EXCEPT
           SELECT a.l l, unicode(a.l) - unicode(b.l) d 
           FROM l a, l b 
           WHERE d > 0 
           )
SELECT max(v) FROM ( SELECT min(d.n) v FROM d GROUP BY d.l );
```
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), ~~14~~ ~~13~~ 12 bytes
```
{⊇pS∧ẠsSl}ᶠ⌉
```
[Try it online!](https://tio.run/##ATEAzv9icmFjaHlsb2cy//974oqHcFPiiKfhuqBzU2x94bag4oyJ//8idHV0b3JpYWxzIv9a "Brachylog – Try It Online")
```
{        }ᶠ    % Find all values that satisfy this predicate
           ⌉   % And get their maximum
               % The predicate being:
 ⊇pS           % There exists a permutation of a subset of the input
               %  Call it S
    ∧          % And, 
      sS       % S is a substring of
     Ạ         %  the set of alphabets, Ạ, 
        l      % Then, the length of that substring is the return value of the 
               %  predicate
```
Slow enough that it doesn't finish for input "antidisestablishmentarianism" on TIO. Relatively much faster one for +1 byte:
### 13 bytes
```
{dosS∧ẠsSl}ᶠ⌉
```
[Try it online!](https://tio.run/##SypKTM6ozMlPN/r/vzolvzj4Ucfyh7sWFAfn1D7ctuBRT@f//0pJicnZKfn5RUr/owA "Brachylog – Try It Online")
Use `dos` instead of `⊇p`: S is a `d`eduplicated s`o`rted `s`ubstring of the input, instead of just some permutation of some subset. 
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal), 7 bytes
```
CÞǔ0€∩L
```
[Try it Online!](https://vyxal.pythonanywhere.com/#WyIiLCIiLCJDw57HlDDigqziiKlMIiwiIiwiYW50aWRpc2VzdGFibGlzaG1lbnRhcmlhbmlzbSJd)
Port of Jelly.
[Answer]
# [Ruby](https://www.ruby-lang.org/), ~~63~~ 59 bytes
Not very golfy.
-4 bytes thanks to [manatwork](https://codegolf.stackexchange.com/users/4198/manatwork)
```
->s{s.bytes.uniq.sort.slice_when{_2!=_1+1}.map(&:size).max}
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72kqDSpcsEiN9ulpSVpuhY3rXXtiquL9ZIqS1KL9UrzMgv1ivOLSvSKczKTU-PLM1LzquONFG3jDbUNa_VyEws01KyKM6tSNYHsilqoEcoFCm7RSol5JZkpmcWpxSWJSTmZxRm5qXkliUWZiXmZxblKsRClCxZAaAA)
[Answer]
# Ruby, 43 characters
```
->s{(?a..?z).map{$.=s=~/#{_1}/?$.+1:0}.max}
```
Sample run:
```
bash-5.1$ ruby -e 'p ->s{(?a..?z).map{$.=s=~/#{_1}/?$.+1:0}.max}["backdoor"]'
4
```
[Attempt This Online!](https://ato.pxeger.com/run?1=XVDLSsNAFMVl8hUXbBilSdpQF1KYZmVBXBTishSZTEYSmhe5E6ym8UfcBNGP0q9x8mgDbu7jnHsO996Pr6L0X5vPNf0u5bN1-zO1Vlhducy23bdrO2F5NbEp0vfZZfXk1DN3Yk-d5bxWzKHuJb8XD3kpEYhhLeYIhnMOSMCALblPFU9MIJ7AMu6qu0MuuBRBWz-WnAtEstMrXSMvTPKQAF2BY6oWJSuwaxdty1IZBREKBftxhGEiUjUQsTTCZJzyGd8HWVZ0yE2nGx1lKTOliPHE1rZgPIQgg2PUbmqCGLY76lrRrQwU1tuO3Onav2ODIfTHDg69bHQ6IUDpGQMXyGZPYKne4XkbTz1ApEH_06bp8x8)
[Answer]
# [Haskell](https://www.haskell.org/), 87 bytes
```
import Data.List
maximum.map length.filter(`isInfixOf`['a'..'z']).subsequences.nub.sort
```
[Try it online!](https://tio.run/##DcxBCsJADADAu68IRVi95Ae9eREEHyBCU8na4CbWTRaKn1@dB8xC/uJSehdd3zXgREF4EY9dHpU20aaotEJhe8aCWUpwPUziZ8uyXfN0S5QQ0zfdj@htdv40tgc7WpvR/2VXEoMR1ioWsIcMgwdVH/oP "Haskell – Try It Online")
Expects lowercase characters
Explanation:
```
maximum.map length.filter(`isInfixOf`['a'..'z']).subsequences.nub.sort
                                                                  sort {- sort the characters -}
                                                              nub      {- remove duplicates -}
                                                 subsequences          {- all subsequences -}
                   filter(`isInfixOf`['a'..'z'])                       {- all characters are adjacent -}
        map length                                                     {- length of filtered subsequences -}
maximum                                                                {- maxmimum length -}
```
[Answer]
# [Python 2](https://docs.python.org/2/), 95 bytes
```
lambda s:max(reduce(lambda(p,v),c:(c,v+[v[-1]*(c==p+1)+1]),map(ord,sorted(set(s))),(0,[0]))[1])
```
[Try it online!](https://tio.run/##JY1LbsQgEETXySnY0cQ90jhLS56LEC8wYBnFfET3OMnpCU42pVK9J1X54T2n97bNH@0wcXVG0BTNN1TvntbD/wYFT4V2AovnoE99G5c3sPNchlEN46IwmgK5OqRc2Tsgz0BKKYQ76vuilO5S23IVJEISWn4ZtrtEIYlNpauYxMEF8n1Yj0B79KmjYFKgePHV2E@Xc/1zr@An584Pksv0@lJqSCwI5e0hcevnrf0C "Python 2 – Try It Online")
[Answer]
# Pyth - 11 bytes
```
le@.:G).:S{
```
Input must be wrapped in quotes. If not allowed:
# Pyth - 12 bytes
```
le@.:G).:S{z
```
Explanation:
```
l(
  e(
    @(
      .:(G),
      .:(
         S(
           {(Q)
         )
      )
    )
  )
)
length(
    last element(
        intersection(
            all positive length substrings(the alphabet as string),
            all positive length substrings(
                sorted(
                    uniquified(input)
                )
            )
        )
    )
)
```
]