Skip to main content
3 of 6
added 2 characters in body

Julia, 111 bytes

r\n='A':'Z'⊆uppercase(r) ? count(isletter,r)=>r : n+1=>""
~S=minimum(S[i:j]\n for i=1:(n=length(S)),j=1:n)[2]

Attempt This Online!

  • returns "" for falsy cases
  • very ineffective (both time and memory)
  • does not optimize for window size/length - only the letter length is considered
  • -1 byte by changing n+1 for 2n ...