Skip to content

Commit

Permalink
✨ lc 437-1
Browse files Browse the repository at this point in the history
  • Loading branch information
codereport committed Feb 19, 2025
1 parent d57db99 commit 51c3264
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions leetcode/437-1.bqn
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Link: https://leetcode.com/problems/find-special-substring-of-length-k

u•Import "/home/cph/bqn-test/test.bqn"
fn•Import "/home/cph/bqn-code/lib/fun.bqn"

HasSpecialSubstring ← { ´𝕨=≠¨fn.Group𝕩 } # Explicit
HasSpecialSubstring2´=(¨fn.Group) # Tacit

# Tests
u.UnitTest (3 HasSpecialSubstring "aaabaaa") 1
u.UnitTest (2 HasSpecialSubstring "abc") 0
u.UnitTest (3 HasSpecialSubstring2 "aaabaaa") 1
u.UnitTest (2 HasSpecialSubstring2 "abc") 0

0 comments on commit 51c3264

Please sign in to comment.