diff options
| -rw-r--r-- | challenge-114/richard-park/apl/ch-1.aplf | 1 | ||||
| -rw-r--r-- | challenge-114/richard-park/apl/ch-2.aplf | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/challenge-114/richard-park/apl/ch-1.aplf b/challenge-114/richard-park/apl/ch-1.aplf new file mode 100644 index 0000000000..c6951f9c12 --- /dev/null +++ b/challenge-114/richard-park/apl/ch-1.aplf @@ -0,0 +1 @@ +NextPalindromeNumber←{(⊢≡⌽)⍕⍵:⍵ ⋄ ∇ ⍵+1}
\ No newline at end of file diff --git a/challenge-114/richard-park/apl/ch-2.aplf b/challenge-114/richard-park/apl/ch-2.aplf new file mode 100644 index 0000000000..23761cf55a --- /dev/null +++ b/challenge-114/richard-park/apl/ch-2.aplf @@ -0,0 +1,7 @@ + HigherIntegerSetBits←{ + n←⍵+1 ⍝ Next integer + (sb nb)←+⌿2⊥⍣¯1⊢⍵,n ⍝ Set Bits, Next Bits + ⍺←sb ⍝ Fix set bits for recursion + ⍺=nb:n ⍝ Found, return result + ⍺ ∇ n ⍝ Try next number + }
\ No newline at end of file |
