We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 21a492f commit b9c4fd2Copy full SHA for b9c4fd2
0427_Problem_1.bqn
@@ -0,0 +1,15 @@
1
+# For up to date code:
2
+# https://github.com/codereport/bqn-code/blob/main/leetcode/427-1.bqn
3
+
4
+# Link: https://leetcode.com/problems/transformed-array
5
6
+u ⇐ •Import "/home/cph/bqn-test/test.bqn"
7
8
+ConstructTransformedArray ← {𝕩⊏˜(≠𝕩)|𝕩+↕≠𝕩} # Explicit
9
+ConstructTransformedArray2 ← (≠|↕∘≠⊸+)⊸⊏ # Tacit
10
11
+# Tests
12
+u.UnitTest (ConstructTransformedArray 3‿¯2‿1‿1) ≡ 1‿1‿1‿3
13
+u.UnitTest (ConstructTransformedArray ¯1‿4‿¯1) ≡ ¯1‿¯1‿4
14
+u.UnitTest (ConstructTransformedArray2 3‿¯2‿1‿1) ≡ 1‿1‿1‿3
15
+u.UnitTest (ConstructTransformedArray2 ¯1‿4‿¯1) ≡ ¯1‿¯1‿4
0 commit comments