aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-278/conor-hoekstra/ch-1.bqn11
-rw-r--r--challenge-278/conor-hoekstra/ch-2.bqn9
2 files changed, 20 insertions, 0 deletions
diff --git a/challenge-278/conor-hoekstra/ch-1.bqn b/challenge-278/conor-hoekstra/ch-1.bqn
new file mode 100644
index 0000000000..c56553c550
--- /dev/null
+++ b/challenge-278/conor-hoekstra/ch-1.bqn
@@ -0,0 +1,11 @@
+# For up to date code:
+# https://github.com/codereport/bqn-code/blob/main/pwc/278-1.bqn
+
+⟨Words, Unwords⟩ ⇐ •Import "../lib/string.bqn"
+
+SortString ← Unwords·¯1⊸↓¨·(⍋¯1⊸↑¨)⊸⊏Words
+
+# Tests
+•Show SortString "and2 Raku3 cousins5 Perl1 are4" # "Perl and Raku are cousins"
+•Show SortString "guest6 Python1 most4 the3 popular5 is2 language7" # "Python is the most popular guest language"
+•Show SortString "Challenge3 The1 Weekly2" # "The Weekly Challenge"
diff --git a/challenge-278/conor-hoekstra/ch-2.bqn b/challenge-278/conor-hoekstra/ch-2.bqn
new file mode 100644
index 0000000000..51d8e5c629
--- /dev/null
+++ b/challenge-278/conor-hoekstra/ch-2.bqn
@@ -0,0 +1,9 @@
+# For up to date code:
+# https://github.com/codereport/bqn-code/blob/main/pwc/278-2.bqn
+
+ReverseWord ← (⊑0∾˜1+/∘=)(∧∘↑∾↓)⊢
+
+# Tests
+•Show 'e' ReverseWord "challenge" # "acehllnge"
+•Show 'a' ReverseWord "programming" # "agoprrmming"
+•Show 'b' ReverseWord "champion" # "champion"