aboutsummaryrefslogtreecommitdiff
path: root/challenge-145/conor-hoekstra
diff options
context:
space:
mode:
authorMohammad S Anwar <Mohammad.Anwar@yahoo.com>2021-12-28 22:28:37 +0000
committerGitHub <noreply@github.com>2021-12-28 22:28:37 +0000
commit13e64bcb25a952c2b4f82d3edaf298ada4f855b5 (patch)
tree1936a2b26e3c2d03dd29f245eebc5ddb9ff5cff7 /challenge-145/conor-hoekstra
parentcc72a2ea325ac4a00b6a84dd29c5b0c94990f37c (diff)
parent4262968405be0dc7b75cecb42deaa6e059b36ccb (diff)
downloadperlweeklychallenge-club-13e64bcb25a952c2b4f82d3edaf298ada4f855b5.tar.gz
perlweeklychallenge-club-13e64bcb25a952c2b4f82d3edaf298ada4f855b5.tar.bz2
perlweeklychallenge-club-13e64bcb25a952c2b4f82d3edaf298ada4f855b5.zip
Merge pull request #5435 from codereport/master
Week 144 Solution in APL
Diffstat (limited to 'challenge-145/conor-hoekstra')
-rw-r--r--challenge-145/conor-hoekstra/ch-01.apl4
-rw-r--r--challenge-145/conor-hoekstra/ch-02.bqn9
2 files changed, 13 insertions, 0 deletions
diff --git a/challenge-145/conor-hoekstra/ch-01.apl b/challenge-145/conor-hoekstra/ch-01.apl
new file mode 100644
index 0000000000..e48168c64f
--- /dev/null
+++ b/challenge-145/conor-hoekstra/ch-01.apl
@@ -0,0 +1,4 @@
+dotProduct ← +.×
+
+⍝ Test
+1 2 3 dotProduct 4 5 6 ⍝ 32
diff --git a/challenge-145/conor-hoekstra/ch-02.bqn b/challenge-145/conor-hoekstra/ch-02.bqn
new file mode 100644
index 0000000000..7f2ffd35f8
--- /dev/null
+++ b/challenge-145/conor-hoekstra/ch-02.bqn
@@ -0,0 +1,9 @@
+PalindromicTree ← {1↓(⌽≡⊢)¨⊸/˜⍷∾´↑¨↓𝕩}
+
+# Tests
+PalindromicTree "redivider" # ⟨ "r" "redivider" "e" "edivide" "d" "divid" "i" "ivi" "v" ⟩
+PalindromicTree "deific" # ⟨ "d" "e" "i" "ifi" "f" "c" ⟩
+PalindromicTree "rotors" # ⟨ "r" "rotor" "o" "oto" "t" "s" ⟩
+PalindromicTree "challenge" # ⟨ "c" "h" "a" "l" "ll" "e" "n" "g" ⟩
+PalindromicTree "champion" # ⟨ "c" "h" "a" "m" "p" "i" "o" "n" ⟩
+PalindromicTree "christmas" # ⟨ "c" "h" "r" "i" "s" "t" "m" "a" ⟩