Longest substrings without repeating characters: Difference between revisions
Longest substrings without repeating characters (view source)
Revision as of 15:57, 7 December 2023
, 6 months ago→BQN: alternative implementation
(→BQN: add) |
(→BQN: alternative implementation) |
||
Line 374:
=={{header|BQN}}==
<syntaxhighlight lang="bqn">LongUniq ← ⌈´⊸=∘(≠¨)⊸/ ∧`∘∊⊸/¨∘↓</syntaxhighlight>
Alternative:
<syntaxhighlight lang="bqn">LongUniq ← ⊢´∘⊔∘(≠¨)⊸⊏
Test:
<syntaxhighlight lang="bqn">LongUniq¨ "a"‿""‿"zzz"‿"xyzyab"‿"xyzyabcybdfd"</syntaxhighlight>
{{out}}
<pre>┌─
|