Skip to main content
added 494 characters in body
Source Link

Julia, 111,110,108 10896 bytes

!S=minimum((r=S[i:j];'A':'Z'⊆uppercase(r) ? count(isletter,r)=>r : 2n=>"")
for i=1:(n=length(S)),j=1:n)[2]
!S=minimum(['A':'Z'⊆(r=S[i:j])|>uppercase ? sum(isletter,r) : Inf,r]
for i=(k=keys(S)),j=k)[2]

Attempt This Online!

Attempt This Online!

  • returns "" for falsy cases
  • very ineffectivecredits to @MarcMush: (both time and memory)96 bytes
  • does not optimize for window size/lengthmy first attack: - only the letter length is considered108 bytes

It returns "" for falsy cases; very ineffective (both for time and for memory); it does not optimize for window size/length - only the letter length is considered

Julia, 111,110 108 bytes

!S=minimum((r=S[i:j];'A':'Z'⊆uppercase(r) ? count(isletter,r)=>r : 2n=>"")
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

Julia, 111,110,108 96 bytes

!S=minimum(['A':'Z'⊆(r=S[i:j])|>uppercase ? sum(isletter,r) : Inf,r]
for i=(k=keys(S)),j=k)[2]

Attempt This Online!

It returns "" for falsy cases; very ineffective (both for time and for memory); it does not optimize for window size/length - only the letter length is considered

moved a helper fun inside the main
Source Link

Julia, 110111,110 108 bytes

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

Attempt This Online!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

Julia, 110 bytes

r\n='A':'Z'⊆uppercase(r) ? count(isletter,r)=>r : 2n=>""
~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

Julia, 111,110 108 bytes

!S=minimum((r=S[i:j];'A':'Z'⊆uppercase(r) ? count(isletter,r)=>r : 2n=>"")
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
n+1->2n
Source Link

Julia, 111110 bytes

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

Attempt This Online!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 ...

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 ...

Julia, 110 bytes

r\n='A':'Z'⊆uppercase(r) ? count(isletter,r)=>r : 2n=>""
~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
added 2 characters in body
Source Link
Loading
deleted 1 character in body
Source Link
Loading
Source Link
Loading