Skip to content

Commit 6d27d52

Browse files
committed
✨ lc 437-1
1 parent cdd5cf9 commit 6d27d52

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

0437_Problem_1.bqn

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# For up to date code:
2+
# https://github.com/codereport/bqn-code/blob/main/leetcode/437-1.bqn
3+
4+
# Link: https://leetcode.com/problems/find-special-substring-of-length-k
5+
6+
u•Import "/home/cph/bqn-test/test.bqn"
7+
fn•Import "/home/cph/bqn-code/lib/fun.bqn"
8+
9+
HasSpecialSubstring ← { ´𝕨=≠¨fn.Group𝕩 } # Explicit
10+
HasSpecialSubstring2´=(¨fn.Group) # Tacit
11+
12+
# Tests
13+
u.UnitTest (3 HasSpecialSubstring "aaabaaa") 1
14+
u.UnitTest (2 HasSpecialSubstring "abc") 0
15+
u.UnitTest (3 HasSpecialSubstring2 "aaabaaa") 1
16+
u.UnitTest (2 HasSpecialSubstring2 "abc") 0

0 commit comments

Comments
 (0)