Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

#05AB1E , 5 bytes

05AB1E , 5 bytes

ŒIù.M

Try it online or verify the smaller test cases or verify the larger test case (which is a bit slow).

Explanation:

Œ # Push all substrings of the (implicit) input-string
 Iù # Only keep substrings of a length equal to the second input-integer
 .M # Only keep the most frequent item of the remaining substrings
 # (after which it is output implicitly as result)

#05AB1E , 5 bytes

ŒIù.M

Try it online or verify the smaller test cases or verify the larger test case (which is a bit slow).

Explanation:

Œ # Push all substrings of the (implicit) input-string
 Iù # Only keep substrings of a length equal to the second input-integer
 .M # Only keep the most frequent item of the remaining substrings
 # (after which it is output implicitly as result)

05AB1E , 5 bytes

ŒIù.M

Try it online or verify the smaller test cases or verify the larger test case (which is a bit slow).

Explanation:

Œ # Push all substrings of the (implicit) input-string
 Iù # Only keep substrings of a length equal to the second input-integer
 .M # Only keep the most frequent item of the remaining substrings
 # (after which it is output implicitly as result)
added 747 characters in body
Source Link
Kevin Cruijssen
  • 136.2k
  • 14
  • 154
  • 394

#05AB1E, 5 bytes

ŒIù.M

Try it online. or verify the smaller test cases or verify the larger test case (which is a bit slow).

Explanation:

Œ # Push all substrings of the (implicit) input-string
 Iù # Only keep substrings of a length equal to the second input-integer
 .M # Only keep the most frequent item of the remaining substrings
 # (after which it is output implicitly as result)

#05AB1E, 5 bytes

ŒIù.M

Try it online or verify the smaller test cases or verify the larger test case (which is a bit slow).

Explanation:

Œ # Push all substrings of the (implicit) input-string
 Iù # Only keep substrings of a length equal to the second input-integer
 .M # Only keep the most frequent item of the remaining substrings
 # (after which it is output implicitly as result)
Source Link
Kevin Cruijssen
  • 136.2k
  • 14
  • 154
  • 394

AltStyle によって変換されたページ (->オリジナル) /