Skip to content

Commit 1a45747

Browse files
committed
✨ lc b1491
1 parent 4d4ba2f commit 1a45747

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

B0149_Problem_1.bqn

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# For up to date code:
2+
# https://github.com/codereport/bqn-code/blob/main/leetcode/b149-1.bqn
3+
4+
# Link: https://leetcode.com/problems/find-valid-pair-of-adjacent-digits-in-string
5+
6+
u•Import "/home/cph/bqn-test/test.bqn"
7+
fn•Import "/home/cph/bqn-code/lib/fun.bqn"
8+
9+
# TODO improve
10+
FindValidPair ← { ×,·•Fmt¨<˘´˘/(´˘0)/2(-'0'(⊣×=)(+´˘=⌜˜))𝕩 }
11+
12+
# Tests
13+
u.UnitTest (FindValidPair "2523533") "23"
14+
u.UnitTest (FindValidPair "221") "21"
15+
u.UnitTest (FindValidPair "22") ""

0 commit comments

Comments
 (0)