diff options
| -rw-r--r-- | challenge-074/richard-park/apl/FNRCharacter.aplf | 9 | ||||
| -rw-r--r-- | challenge-074/richard-park/apl/MajorityElement.aplf | 5 | ||||
| -rw-r--r-- | challenge-074/richard-park/apl/ch-1.aplf | 5 | ||||
| -rw-r--r-- | challenge-074/richard-park/apl/ch-2.aplf | 9 | ||||
| -rw-r--r-- | challenge-074/richard-park/blog.txt | 1 |
5 files changed, 29 insertions, 0 deletions
diff --git a/challenge-074/richard-park/apl/FNRCharacter.aplf b/challenge-074/richard-park/apl/FNRCharacter.aplf new file mode 100644 index 0000000000..1ed3fe014e --- /dev/null +++ b/challenge-074/richard-park/apl/FNRCharacter.aplf @@ -0,0 +1,9 @@ + FNRCharacter←{ + FNR←{ + fnr←⊃⌽' '~⍨,(⊣(⌿⍨)(1=(≢⊢)))⌸⍵ ⍝ Last non-repeating element + ' '≡fnr:'#' ⍝ No unique elements + fnr + } + FNR¨(↑∘⍵)¨⍳≢⍵ ⍝ "First" Non-Repeating characters + ⍝ In subsets of ⍵ of length 1 to ≢⍵ + } diff --git a/challenge-074/richard-park/apl/MajorityElement.aplf b/challenge-074/richard-park/apl/MajorityElement.aplf new file mode 100644 index 0000000000..cc4207f8d1 --- /dev/null +++ b/challenge-074/richard-park/apl/MajorityElement.aplf @@ -0,0 +1,5 @@ + MajorityElement←{ + me←(∪⍵)⌿⍨((≢⊢)⌸⍵)>(⌊2÷⍨≢⍵) ⍝ Majority major cell + (,0)≡⍴me:¯1 ⍝ No majority major cell + me + } diff --git a/challenge-074/richard-park/apl/ch-1.aplf b/challenge-074/richard-park/apl/ch-1.aplf new file mode 100644 index 0000000000..cc4207f8d1 --- /dev/null +++ b/challenge-074/richard-park/apl/ch-1.aplf @@ -0,0 +1,5 @@ + MajorityElement←{ + me←(∪⍵)⌿⍨((≢⊢)⌸⍵)>(⌊2÷⍨≢⍵) ⍝ Majority major cell + (,0)≡⍴me:¯1 ⍝ No majority major cell + me + } diff --git a/challenge-074/richard-park/apl/ch-2.aplf b/challenge-074/richard-park/apl/ch-2.aplf new file mode 100644 index 0000000000..1ed3fe014e --- /dev/null +++ b/challenge-074/richard-park/apl/ch-2.aplf @@ -0,0 +1,9 @@ + FNRCharacter←{ + FNR←{ + fnr←⊃⌽' '~⍨,(⊣(⌿⍨)(1=(≢⊢)))⌸⍵ ⍝ Last non-repeating element + ' '≡fnr:'#' ⍝ No unique elements + fnr + } + FNR¨(↑∘⍵)¨⍳≢⍵ ⍝ "First" Non-Repeating characters + ⍝ In subsets of ⍵ of length 1 to ≢⍵ + } diff --git a/challenge-074/richard-park/blog.txt b/challenge-074/richard-park/blog.txt new file mode 100644 index 0000000000..82943408f3 --- /dev/null +++ b/challenge-074/richard-park/blog.txt @@ -0,0 +1 @@ +https://www.youtube.com/watch?v=JMW1SqIj0pM |
