Skip to content

Commit 3a7ca99

Browse files
committed
✨ lc 431-1
1 parent e0cbcba commit 3a7ca99

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

0431_Problem_1.bqn

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# For up to date code:
2+
# https://github.com/codereport/bqn-code/blob/main/leetcode/431-1.bqn
3+
4+
# Link: https://leetcode.com/problems/maximum-subarray-with-equal-products
5+
6+
u•Import "/home/cph/bqn-test/test.bqn"
7+
8+
MaxLength ← { ´¨(⊢/˜×´=•math.LCM´×•math.GCD´)¨1↓⍷∾↓¨𝕩 }
9+
10+
# Tests
11+
u.UnitTest (MaxLength1,2,1,2,1,1,1⟩) 5
12+
u.UnitTest (MaxLength2,3,4,5,6⟩) 3
13+
u.UnitTest (MaxLength1,2,3,1,4,5,1⟩) 5

0 commit comments

Comments
 (0)