From 6f0d16f05f2773a17829abb2db30dff2c2f73444 Mon Sep 17 00:00:00 2001 From: Mohammad Sajid Anwar Date: Thu, 31 Jul 2025 11:32:35 +0100 Subject: - Added solutions by Conor Hoekstra. - Added solutions by Lukas Mai. - Added solutions by Peter Meszaros. - Added solutions by Peter Campbell Smith. - Added solutions by Andrew Shitov. - Added solutions by David Ferrone. - Added solutions by E. Choroba. - Added solutions by Jaldhar H. Vyas. - Added solutions by Bob Lied. - Added solutions by Mark Anderson. - Added solutions by W. Luis Mochan. - Added solutions by Feng Chang. - Added solutions by Arne Sommer. - Added solutions by Simon Proctor. - Added solutions by HVukamn. - Added solutions by Benjamin Andre. - Added solutions by PokGoPun. - Added solutions by Magnus Markling. - Added solutions by Roger Bell_West. - Added solutions by Athanasius. - Added solutions by Robbie Hatley. - Added solutions by Packy Anderson. - Added solutions by Ali Moradi. - Added solutions by Thomas Kohler. --- challenge-322/conor-hoekstra/bqn/ch-1.bqn | 14 + challenge-322/conor-hoekstra/bqn/ch-2.bqn | 15 + challenge-322/conor-hoekstra/ch-1.bqn | 14 - challenge-322/conor-hoekstra/ch-2.bqn | 15 - challenge-323/conor-hoekstra/bqn/ch-1.bqn | 11 + challenge-323/conor-hoekstra/bqn/ch-2.bqn | 21 + challenge-323/conor-hoekstra/ch-1.bqn | 11 - challenge-323/conor-hoekstra/ch-2.bqn | 21 - challenge-325/conor-hoekstra/bqn/ch-1.bqn | 11 + challenge-325/conor-hoekstra/bqn/ch-2.bqn | 12 + challenge-325/conor-hoekstra/ch-1.bqn | 11 - challenge-325/conor-hoekstra/ch-2.bqn | 12 - challenge-326/conor-hoekstra/bqn/ch-1.bqn | 16 + challenge-326/conor-hoekstra/bqn/ch-2.bqn | 15 + challenge-326/conor-hoekstra/ch-1.bqn | 16 - challenge-326/conor-hoekstra/ch-2.bqn | 15 - challenge-327/conor-hoekstra/bqn/ch-1.bqn | 11 + challenge-327/conor-hoekstra/bqn/ch-2.bqn | 12 + challenge-327/conor-hoekstra/ch-1.bqn | 11 - challenge-327/conor-hoekstra/ch-2.bqn | 12 - challenge-328/conor-hoekstra/bqn/ch-1.bqn | 19 + challenge-328/conor-hoekstra/bqn/ch-2.bqn | 14 + challenge-328/conor-hoekstra/ch-1.bqn | 19 - challenge-328/conor-hoekstra/ch-2.bqn | 14 - challenge-329/conor-hoekstra/bqn/ch-1.bqn | 12 + challenge-329/conor-hoekstra/bqn/ch-2.bqn | 14 + challenge-329/conor-hoekstra/ch-1.bqn | 12 - challenge-329/conor-hoekstra/ch-2.bqn | 14 - challenge-330/conor-hoekstra/bqn/ch-1.bqn | 14 + challenge-330/conor-hoekstra/bqn/ch-2.bqn | 16 + challenge-330/conor-hoekstra/ch-1.bqn | 14 - challenge-330/conor-hoekstra/ch-2.bqn | 16 - challenge-331/conor-hoekstra/bqn/ch-1.bqn | 12 + challenge-331/conor-hoekstra/bqn/ch-2.bqn | 16 + challenge-331/conor-hoekstra/ch-1.bqn | 12 - challenge-331/conor-hoekstra/ch-2.bqn | 16 - challenge-332/conor-hoekstra/bqn/ch-1.bqn | 13 + challenge-332/conor-hoekstra/bqn/ch-2.bqn | 12 + challenge-332/conor-hoekstra/ch-1.bqn | 13 - challenge-332/conor-hoekstra/ch-2.bqn | 12 - challenge-332/eric-cheung/python/ch-1.py | 8 + challenge-332/eric-cheung/python/ch-2.py | 8 + challenge-332/ulrich-rieke/cpp/ch-1.cpp | 49 +++ challenge-332/ulrich-rieke/cpp/ch-2.cpp | 17 + challenge-332/ulrich-rieke/haskell/ch-1.hs | 20 + challenge-332/ulrich-rieke/haskell/ch-2.hs | 18 + challenge-332/ulrich-rieke/perl/ch-1.pl | 11 + challenge-332/ulrich-rieke/perl/ch-2.pl | 17 + challenge-332/ulrich-rieke/raku/ch-1.raku | 7 + challenge-332/ulrich-rieke/raku/ch-2.raku | 7 + challenge-332/ulrich-rieke/rust/ch-1.rs | 30 ++ challenge-332/ulrich-rieke/rust/ch-2.rs | 14 + stats/pwc-challenge-331.json | 645 +++++++++++++++++++++++++++++ stats/pwc-current.json | 259 +----------- stats/pwc-language-breakdown-2019.json | 2 +- stats/pwc-language-breakdown-2020.json | 2 +- stats/pwc-language-breakdown-2021.json | 2 +- stats/pwc-language-breakdown-2022.json | 2 +- stats/pwc-language-breakdown-2023.json | 2 +- stats/pwc-language-breakdown-2024.json | 2 +- stats/pwc-language-breakdown-2025.json | 25 +- stats/pwc-language-breakdown-summary.json | 8 +- stats/pwc-leaders.json | 184 ++++---- stats/pwc-summary-1-30.json | 12 +- stats/pwc-summary-121-150.json | 2 +- stats/pwc-summary-151-180.json | 4 +- stats/pwc-summary-181-210.json | 4 +- stats/pwc-summary-211-240.json | 14 +- stats/pwc-summary-241-270.json | 10 +- stats/pwc-summary-271-300.json | 8 +- stats/pwc-summary-301-330.json | 10 +- stats/pwc-summary-31-60.json | 10 +- stats/pwc-summary-61-90.json | 8 +- stats/pwc-summary-91-120.json | 8 +- stats/pwc-summary.json | 72 ++-- stats/pwc-yearly-language-summary.json | 10 +- 76 files changed, 1352 insertions(+), 719 deletions(-) create mode 100644 challenge-322/conor-hoekstra/bqn/ch-1.bqn create mode 100644 challenge-322/conor-hoekstra/bqn/ch-2.bqn delete mode 100644 challenge-322/conor-hoekstra/ch-1.bqn delete mode 100644 challenge-322/conor-hoekstra/ch-2.bqn create mode 100644 challenge-323/conor-hoekstra/bqn/ch-1.bqn create mode 100644 challenge-323/conor-hoekstra/bqn/ch-2.bqn delete mode 100644 challenge-323/conor-hoekstra/ch-1.bqn delete mode 100644 challenge-323/conor-hoekstra/ch-2.bqn create mode 100644 challenge-325/conor-hoekstra/bqn/ch-1.bqn create mode 100644 challenge-325/conor-hoekstra/bqn/ch-2.bqn delete mode 100644 challenge-325/conor-hoekstra/ch-1.bqn delete mode 100644 challenge-325/conor-hoekstra/ch-2.bqn create mode 100644 challenge-326/conor-hoekstra/bqn/ch-1.bqn create mode 100644 challenge-326/conor-hoekstra/bqn/ch-2.bqn delete mode 100644 challenge-326/conor-hoekstra/ch-1.bqn delete mode 100644 challenge-326/conor-hoekstra/ch-2.bqn create mode 100644 challenge-327/conor-hoekstra/bqn/ch-1.bqn create mode 100644 challenge-327/conor-hoekstra/bqn/ch-2.bqn delete mode 100644 challenge-327/conor-hoekstra/ch-1.bqn delete mode 100644 challenge-327/conor-hoekstra/ch-2.bqn create mode 100644 challenge-328/conor-hoekstra/bqn/ch-1.bqn create mode 100644 challenge-328/conor-hoekstra/bqn/ch-2.bqn delete mode 100644 challenge-328/conor-hoekstra/ch-1.bqn delete mode 100644 challenge-328/conor-hoekstra/ch-2.bqn create mode 100644 challenge-329/conor-hoekstra/bqn/ch-1.bqn create mode 100644 challenge-329/conor-hoekstra/bqn/ch-2.bqn delete mode 100644 challenge-329/conor-hoekstra/ch-1.bqn delete mode 100644 challenge-329/conor-hoekstra/ch-2.bqn create mode 100644 challenge-330/conor-hoekstra/bqn/ch-1.bqn create mode 100644 challenge-330/conor-hoekstra/bqn/ch-2.bqn delete mode 100644 challenge-330/conor-hoekstra/ch-1.bqn delete mode 100644 challenge-330/conor-hoekstra/ch-2.bqn create mode 100644 challenge-331/conor-hoekstra/bqn/ch-1.bqn create mode 100644 challenge-331/conor-hoekstra/bqn/ch-2.bqn delete mode 100644 challenge-331/conor-hoekstra/ch-1.bqn delete mode 100644 challenge-331/conor-hoekstra/ch-2.bqn create mode 100644 challenge-332/conor-hoekstra/bqn/ch-1.bqn create mode 100644 challenge-332/conor-hoekstra/bqn/ch-2.bqn delete mode 100644 challenge-332/conor-hoekstra/ch-1.bqn delete mode 100644 challenge-332/conor-hoekstra/ch-2.bqn create mode 100755 challenge-332/eric-cheung/python/ch-1.py create mode 100755 challenge-332/eric-cheung/python/ch-2.py create mode 100755 challenge-332/ulrich-rieke/cpp/ch-1.cpp create mode 100755 challenge-332/ulrich-rieke/cpp/ch-2.cpp create mode 100755 challenge-332/ulrich-rieke/haskell/ch-1.hs create mode 100755 challenge-332/ulrich-rieke/haskell/ch-2.hs create mode 100755 challenge-332/ulrich-rieke/perl/ch-1.pl create mode 100755 challenge-332/ulrich-rieke/perl/ch-2.pl create mode 100755 challenge-332/ulrich-rieke/raku/ch-1.raku create mode 100755 challenge-332/ulrich-rieke/raku/ch-2.raku create mode 100755 challenge-332/ulrich-rieke/rust/ch-1.rs create mode 100755 challenge-332/ulrich-rieke/rust/ch-2.rs create mode 100644 stats/pwc-challenge-331.json diff --git a/challenge-322/conor-hoekstra/bqn/ch-1.bqn b/challenge-322/conor-hoekstra/bqn/ch-1.bqn new file mode 100644 index 0000000000..3af00f74a2 --- /dev/null +++ b/challenge-322/conor-hoekstra/bqn/ch-1.bqn @@ -0,0 +1,14 @@ +# For up to date code: +# https://github.com/codereport/bqn-code/blob/main/pwc/322-1.bqn + +u ⇐ •Import "/home/cph/bqn-test/test.bqn" +s ⇐ •Import "/home/cph/bqn-code/lib/string.bqn" +fn ⇐ •Import "/home/cph/bqn-code/lib/fun.bqn" + +Tf ← '-'s.Join fn.Chunk⟜∾ # tail format +Sf ← { n𝕊x:{ n>≠⊑𝕩 ? (⊑𝕩)∾"-"∾n Tf 1↓𝕩 ; n Tf 𝕩 } '-'s.Split x } # string format + +# Tests +u.UnitTest (3 Sf "ABC-D-E-F") ≡ "ABC-DEF" +u.UnitTest (2 Sf "A-BC-D-E") ≡ "A-BC-DE" +u.UnitTest (4 Sf "-A-B-CD-E") ≡ "A-BCDE" diff --git a/challenge-322/conor-hoekstra/bqn/ch-2.bqn b/challenge-322/conor-hoekstra/bqn/ch-2.bqn new file mode 100644 index 0000000000..b981bdfb46 --- /dev/null +++ b/challenge-322/conor-hoekstra/bqn/ch-2.bqn @@ -0,0 +1,15 @@ +# For up to date code: +# https://github.com/codereport/bqn-code/blob/main/pwc/322-2.bqn + +u ⇐ •Import "/home/cph/bqn-test/test.bqn" + +RankArray ← { 1+𝕩⊐˜∧⍷𝕩 } # explicit +RankArray2 ← 1+∧∘⍷⊐⊢ # tacit + +# Tests +u.UnitTest (RankArray 55‿22‿44‿33) ≡ 4‿1‿3‿2 +u.UnitTest (RankArray 10‿10‿10) ≡ 1‿1‿1 +u.UnitTest (RankArray 5‿1‿1‿4‿3) ≡ 4‿1‿1‿3‿2 +u.UnitTest (RankArray2 55‿22‿44‿33) ≡ 4‿1‿3‿2 +u.UnitTest (RankArray2 10‿10‿10) ≡ 1‿1‿1 +u.UnitTest (RankArray2 5‿1‿1‿4‿3) ≡ 4‿1‿1‿3‿2 diff --git a/challenge-322/conor-hoekstra/ch-1.bqn b/challenge-322/conor-hoekstra/ch-1.bqn deleted file mode 100644 index 3af00f74a2..0000000000 --- a/challenge-322/conor-hoekstra/ch-1.bqn +++ /dev/null @@ -1,14 +0,0 @@ -# For up to date code: -# https://github.com/codereport/bqn-code/blob/main/pwc/322-1.bqn - -u ⇐ •Import "/home/cph/bqn-test/test.bqn" -s ⇐ •Import "/home/cph/bqn-code/lib/string.bqn" -fn ⇐ •Import "/home/cph/bqn-code/lib/fun.bqn" - -Tf ← '-'s.Join fn.Chunk⟜∾ # tail format -Sf ← { n𝕊x:{ n>≠⊑𝕩 ? (⊑𝕩)∾"-"∾n Tf 1↓𝕩 ; n Tf 𝕩 } '-'s.Split x } # string format - -# Tests -u.UnitTest (3 Sf "ABC-D-E-F") ≡ "ABC-DEF" -u.UnitTest (2 Sf "A-BC-D-E") ≡ "A-BC-DE" -u.UnitTest (4 Sf "-A-B-CD-E") ≡ "A-BCDE" diff --git a/challenge-322/conor-hoekstra/ch-2.bqn b/challenge-322/conor-hoekstra/ch-2.bqn deleted file mode 100644 index b981bdfb46..0000000000 --- a/challenge-322/conor-hoekstra/ch-2.bqn +++ /dev/null @@ -1,15 +0,0 @@ -# For up to date code: -# https://github.com/codereport/bqn-code/blob/main/pwc/322-2.bqn - -u ⇐ •Import "/home/cph/bqn-test/test.bqn" - -RankArray ← { 1+𝕩⊐˜∧⍷𝕩 } # explicit -RankArray2 ← 1+∧∘⍷⊐⊢ # tacit - -# Tests -u.UnitTest (RankArray 55‿22‿44‿33) ≡ 4‿1‿3‿2 -u.UnitTest (RankArray 10‿10‿10) ≡ 1‿1‿1 -u.UnitTest (RankArray 5‿1‿1‿4‿3) ≡ 4‿1‿1‿3‿2 -u.UnitTest (RankArray2 55‿22‿44‿33) ≡ 4‿1‿3‿2 -u.UnitTest (RankArray2 10‿10‿10) ≡ 1‿1‿1 -u.UnitTest (RankArray2 5‿1‿1‿4‿3) ≡ 4‿1‿1‿3‿2 diff --git a/challenge-323/conor-hoekstra/bqn/ch-1.bqn b/challenge-323/conor-hoekstra/bqn/ch-1.bqn new file mode 100644 index 0000000000..92b237f6e6 --- /dev/null +++ b/challenge-323/conor-hoekstra/bqn/ch-1.bqn @@ -0,0 +1,11 @@ +# For up to date code: +# https://github.com/codereport/bqn-code/blob/main/pwc/323-1.bqn + +u ⇐ •Import "/home/cph/bqn-test/test.bqn" + +IncrementDecrement ← +´·-˝"+-"=⌜⊑∘∧¨ + +# Tests +u.UnitTest (IncrementDecrement ⟨"--x", "x++", "x++"⟩) ≡ 1 +u.UnitTest (IncrementDecrement ⟨"x++", "++x", "x++"⟩) ≡ 3 +u.UnitTest (IncrementDecrement ⟨"x++", "++x", "--x", "x--"⟩) ≡ 0 diff --git a/challenge-323/conor-hoekstra/bqn/ch-2.bqn b/challenge-323/conor-hoekstra/bqn/ch-2.bqn new file mode 100644 index 0000000000..ce480bc8b6 --- /dev/null +++ b/challenge-323/conor-hoekstra/bqn/ch-2.bqn @@ -0,0 +1,21 @@ +# For up to date code: +# https://github.com/codereport/bqn-code/blob/main/pwc/323-2.bqn + +u ⇐ •Import "/home/cph/bqn-test/test.bqn" +fn ⇐ •Import "/home/cph/bqn-code/lib/fun.bqn" + +TaxAmount ← { + b ← fn.Deltas 0∾𝕨⌊⊑¨𝕩 # brackets + t ← 100÷˜⊢´¨𝕩 # tax rates + +´b×t +} + +TaxAmount2 ← +´(100÷˜⊢´¨)∘⊢×(fn.Deltas 0∾⌊⟜⊑¨) + +# Tests +u.UnitTest (10 TaxAmount ⟨3‿50, 7‿10, 12‿25⟩) ≡ 2.65 +u.UnitTest ( 2 TaxAmount ⟨1‿0, 4‿25, 5‿50⟩) ≡ 0.25 +u.UnitTest ( 0 TaxAmount ⟨2‿50⟩) ≡ 0 +u.UnitTest (10 TaxAmount2 ⟨3‿50, 7‿10, 12‿25⟩) ≡ 2.65 +u.UnitTest ( 2 TaxAmount2 ⟨1‿0, 4‿25, 5‿50⟩) ≡ 0.25 +u.UnitTest ( 0 TaxAmount2 ⟨2‿50⟩) ≡ 0 diff --git a/challenge-323/conor-hoekstra/ch-1.bqn b/challenge-323/conor-hoekstra/ch-1.bqn deleted file mode 100644 index 92b237f6e6..0000000000 --- a/challenge-323/conor-hoekstra/ch-1.bqn +++ /dev/null @@ -1,11 +0,0 @@ -# For up to date code: -# https://github.com/codereport/bqn-code/blob/main/pwc/323-1.bqn - -u ⇐ •Import "/home/cph/bqn-test/test.bqn" - -IncrementDecrement ← +´·-˝"+-"=⌜⊑∘∧¨ - -# Tests -u.UnitTest (IncrementDecrement ⟨"--x", "x++", "x++"⟩) ≡ 1 -u.UnitTest (IncrementDecrement ⟨"x++", "++x", "x++"⟩) ≡ 3 -u.UnitTest (IncrementDecrement ⟨"x++", "++x", "--x", "x--"⟩) ≡ 0 diff --git a/challenge-323/conor-hoekstra/ch-2.bqn b/challenge-323/conor-hoekstra/ch-2.bqn deleted file mode 100644 index ce480bc8b6..0000000000 --- a/challenge-323/conor-hoekstra/ch-2.bqn +++ /dev/null @@ -1,21 +0,0 @@ -# For up to date code: -# https://github.com/codereport/bqn-code/blob/main/pwc/323-2.bqn - -u ⇐ •Import "/home/cph/bqn-test/test.bqn" -fn ⇐ •Import "/home/cph/bqn-code/lib/fun.bqn" - -TaxAmount ← { - b ← fn.Deltas 0∾𝕨⌊⊑¨𝕩 # brackets - t ← 100÷˜⊢´¨𝕩 # tax rates - +´b×t -} - -TaxAmount2 ← +´(100÷˜⊢´¨)∘⊢×(fn.Deltas 0∾⌊⟜⊑¨) - -# Tests -u.UnitTest (10 TaxAmount ⟨3‿50, 7‿10, 12‿25⟩) ≡ 2.65 -u.UnitTest ( 2 TaxAmount ⟨1‿0, 4‿25, 5‿50⟩) ≡ 0.25 -u.UnitTest ( 0 TaxAmount ⟨2‿50⟩) ≡ 0 -u.UnitTest (10 TaxAmount2 ⟨3‿50, 7‿10, 12‿25⟩) ≡ 2.65 -u.UnitTest ( 2 TaxAmount2 ⟨1‿0, 4‿25, 5‿50⟩) ≡ 0.25 -u.UnitTest ( 0 TaxAmount2 ⟨2‿50⟩) ≡ 0 diff --git a/challenge-325/conor-hoekstra/bqn/ch-1.bqn b/challenge-325/conor-hoekstra/bqn/ch-1.bqn new file mode 100644 index 0000000000..6f90bf0bb6 --- /dev/null +++ b/challenge-325/conor-hoekstra/bqn/ch-1.bqn @@ -0,0 +1,11 @@ +# For up to date code: +# https://github.com/codereport/bqn-code/blob/main/pwc/325-1.bqn + +u ⇐ •Import "/home/cph/bqn-test/test.bqn" + +Mco ← ⌈´(+×⊢)` + +# Tests +u.UnitTest (Mco 0‿1‿1‿0‿1‿1‿1) ≡ 3 +u.UnitTest (Mco 0‿0‿0‿0) ≡ 0 +u.UnitTest (Mco 1‿0‿1‿0‿1‿1) ≡ 2 diff --git a/challenge-325/conor-hoekstra/bqn/ch-2.bqn b/challenge-325/conor-hoekstra/bqn/ch-2.bqn new file mode 100644 index 0000000000..d0b28e2e1c --- /dev/null +++ b/challenge-325/conor-hoekstra/bqn/ch-2.bqn @@ -0,0 +1,12 @@ +# For up to date code: +# https://github.com/codereport/bqn-code/blob/main/pwc/325-2.bqn + +u ⇐ •Import "/home/cph/bqn-test/test.bqn" + +Price ← ⊑·0⊸≤⊸/⊑(-∾⊣)1⊸↓ +FinalPrice ← Price¨¯1↓↓ + +# Tests +u.UnitTest (FinalPrice 8‿4‿6‿2‿3) ≡ 4‿2‿4‿2‿3 +u.UnitTest (FinalPrice 1‿2‿3‿4‿5) ≡ 1‿2‿3‿4‿5 +u.UnitTest (FinalPrice 7‿1‿1‿5) ≡ 6‿0‿1‿5 diff --git a/challenge-325/conor-hoekstra/ch-1.bqn b/challenge-325/conor-hoekstra/ch-1.bqn deleted file mode 100644 index 6f90bf0bb6..0000000000 --- a/challenge-325/conor-hoekstra/ch-1.bqn +++ /dev/null @@ -1,11 +0,0 @@ -# For up to date code: -# https://github.com/codereport/bqn-code/blob/main/pwc/325-1.bqn - -u ⇐ •Import "/home/cph/bqn-test/test.bqn" - -Mco ← ⌈´(+×⊢)` - -# Tests -u.UnitTest (Mco 0‿1‿1‿0‿1‿1‿1) ≡ 3 -u.UnitTest (Mco 0‿0‿0‿0) ≡ 0 -u.UnitTest (Mco 1‿0‿1‿0‿1‿1) ≡ 2 diff --git a/challenge-325/conor-hoekstra/ch-2.bqn b/challenge-325/conor-hoekstra/ch-2.bqn deleted file mode 100644 index d0b28e2e1c..0000000000 --- a/challenge-325/conor-hoekstra/ch-2.bqn +++ /dev/null @@ -1,12 +0,0 @@ -# For up to date code: -# https://github.com/codereport/bqn-code/blob/main/pwc/325-2.bqn - -u ⇐ •Import "/home/cph/bqn-test/test.bqn" - -Price ← ⊑·0⊸≤⊸/⊑(-∾⊣)1⊸↓ -FinalPrice ← Price¨¯1↓↓ - -# Tests -u.UnitTest (FinalPrice 8‿4‿6‿2‿3) ≡ 4‿2‿4‿2‿3 -u.UnitTest (FinalPrice 1‿2‿3‿4‿5) ≡ 1‿2‿3‿4‿5 -u.UnitTest (FinalPrice 7‿1‿1‿5) ≡ 6‿0‿1‿5 diff --git a/challenge-326/conor-hoekstra/bqn/ch-1.bqn b/challenge-326/conor-hoekstra/bqn/ch-1.bqn new file mode 100644 index 0000000000..82bf18819c --- /dev/null +++ b/challenge-326/conor-hoekstra/bqn/ch-1.bqn @@ -0,0 +1,16 @@ +# For up to date code: +# https://github.com/codereport/bqn-code/blob/main/pwc/326-1.bqn + +u ⇐ •Import "/home/cph/bqn-test/test.bqn" +s ⇐ •Import "/home/cph/bqn-code/lib/string.bqn" + +days ← 31‿28‿31‿30‿31‿30‿31‿31‿30‿31‿30‿31 +DayOfYear ← { + m‿d ← •BQN¨1↓'-'⊸s.Split𝕩 + d++´days↑˜m-1 +} + +# Tests +u.UnitTest (DayOfYear "2025-02-02") ≡ 33 +u.UnitTest (DayOfYear "2025-04-10") ≡ 100 +u.UnitTest (DayOfYear "2025-09-07") ≡ 250 diff --git a/challenge-326/conor-hoekstra/bqn/ch-2.bqn b/challenge-326/conor-hoekstra/bqn/ch-2.bqn new file mode 100644 index 0000000000..6c5d6bae36 --- /dev/null +++ b/challenge-326/conor-hoekstra/bqn/ch-2.bqn @@ -0,0 +1,15 @@ +# For up to date code: +# https://github.com/codereport/bqn-code/blob/main/pwc/326-2.bqn + +u ⇐ •Import "/home/cph/bqn-test/test.bqn" + +Decompress ← { ∾⥊´¨<˘2‿∘⥊𝕩 } # Explicit +Decompress2 ← ∾·⥊´¨·<˘2‿∘⥊⊢ # Tacit + +# Tests +u.UnitTest (Decompress 1‿3‿2‿4) ≡ 3‿4‿4 +u.UnitTest (Decompress 1‿1‿2‿2) ≡ 1‿2‿2 +u.UnitTest (Decompress 3‿1‿3‿2) ≡ 1‿1‿1‿2‿2‿2 +u.UnitTest (Decompress2 1‿3‿2‿4) ≡ 3‿4‿4 +u.UnitTest (Decompress2 1‿1‿2‿2) ≡ 1‿2‿2 +u.UnitTest (Decompress2 3‿1‿3‿2) ≡ 1‿1‿1‿2‿2‿2 diff --git a/challenge-326/conor-hoekstra/ch-1.bqn b/challenge-326/conor-hoekstra/ch-1.bqn deleted file mode 100644 index 82bf18819c..0000000000 --- a/challenge-326/conor-hoekstra/ch-1.bqn +++ /dev/null @@ -1,16 +0,0 @@ -# For up to date code: -# https://github.com/codereport/bqn-code/blob/main/pwc/326-1.bqn - -u ⇐ •Import "/home/cph/bqn-test/test.bqn" -s ⇐ •Import "/home/cph/bqn-code/lib/string.bqn" - -days ← 31‿28‿31‿30‿31‿30‿31‿31‿30‿31‿30‿31 -DayOfYear ← { - m‿d ← •BQN¨1↓'-'⊸s.Split𝕩 - d++´days↑˜m-1 -} - -# Tests -u.UnitTest (DayOfYear "2025-02-02") ≡ 33 -u.UnitTest (DayOfYear "2025-04-10") ≡ 100 -u.UnitTest (DayOfYear "2025-09-07") ≡ 250 diff --git a/challenge-326/conor-hoekstra/ch-2.bqn b/challenge-326/conor-hoekstra/ch-2.bqn deleted file mode 100644 index 6c5d6bae36..0000000000 --- a/challenge-326/conor-hoekstra/ch-2.bqn +++ /dev/null @@ -1,15 +0,0 @@ -# For up to date code: -# https://github.com/codereport/bqn-code/blob/main/pwc/326-2.bqn - -u ⇐ •Import "/home/cph/bqn-test/test.bqn" - -Decompress ← { ∾⥊´¨<˘2‿∘⥊𝕩 } # Explicit -Decompress2 ← ∾·⥊´¨·<˘2‿∘⥊⊢ # Tacit - -# Tests -u.UnitTest (Decompress 1‿3‿2‿4) ≡ 3‿4‿4 -u.UnitTest (Decompress 1‿1‿2‿2) ≡ 1‿2‿2 -u.UnitTest (Decompress 3‿1‿3‿2) ≡ 1‿1‿1‿2‿2‿2 -u.UnitTest (Decompress2 1‿3‿2‿4) ≡ 3‿4‿4 -u.UnitTest (Decompress2 1‿1‿2‿2) ≡ 1‿2‿2 -u.UnitTest (Decompress2 3‿1‿3‿2) ≡ 1‿1‿1‿2‿2‿2 diff --git a/challenge-327/conor-hoekstra/bqn/ch-1.bqn b/challenge-327/conor-hoekstra/bqn/ch-1.bqn new file mode 100644 index 0000000000..7eadad6fa0 --- /dev/null +++ b/challenge-327/conor-hoekstra/bqn/ch-1.bqn @@ -0,0 +1,11 @@ +# For up to date code: +# https://github.com/codereport/bqn-code/blob/main/pwc/327-1.bqn + +u ⇐ •Import "/home/cph/bqn-test/test.bqn" + +Missing ← (1+↕∘≠)⊸(¬∘∊/⊣) + +# Tests +u.UnitTest (Missing 1‿2‿1‿3‿2‿5) ≡ 4‿6 +u.UnitTest (Missing 1‿1‿1) ≡ 2‿3 +u.UnitTest (Missing 2‿2‿1) ≡ ⋈3 diff --git a/challenge-327/conor-hoekstra/bqn/ch-2.bqn b/challenge-327/conor-hoekstra/bqn/ch-2.bqn new file mode 100644 index 0000000000..49a89bff11 --- /dev/null +++ b/challenge-327/conor-hoekstra/bqn/ch-2.bqn @@ -0,0 +1,12 @@ +# For up to date code: +# https://github.com/codereport/bqn-code/blob/main/pwc/327-2.bqn + +u ⇐ •Import "/home/cph/bqn-test/test.bqn" +fn ⇐ •Import "/home/cph/bqn-code/lib/fun.bqn" + +MAD ← (⌊´⊸=|∘-´¨)⊸/fn.Pairs + +# Tests +u.UnitTest (MAD 4‿1‿2‿3) ≡ ⟨⟨4,3⟩,⟨1,2⟩,⟨2,3⟩⟩ +u.UnitTest (MAD 1‿3‿7‿11‿15) ≡ ⟨⟨1,3⟩⟩ +u.UnitTest (MAD 1‿5‿3‿8) ≡ ⟨⟨1,3⟩,⟨5,3⟩⟩ diff --git a/challenge-327/conor-hoekstra/ch-1.bqn b/challenge-327/conor-hoekstra/ch-1.bqn deleted file mode 100644 index 7eadad6fa0..0000000000 --- a/challenge-327/conor-hoekstra/ch-1.bqn +++ /dev/null @@ -1,11 +0,0 @@ -# For up to date code: -# https://github.com/codereport/bqn-code/blob/main/pwc/327-1.bqn - -u ⇐ •Import "/home/cph/bqn-test/test.bqn" - -Missing ← (1+↕∘≠)⊸(¬∘∊/⊣) - -# Tests -u.UnitTest (Missing 1‿2‿1‿3‿2‿5) ≡ 4‿6 -u.UnitTest (Missing 1‿1‿1) ≡ 2‿3 -u.UnitTest (Missing 2‿2‿1) ≡ ⋈3 diff --git a/challenge-327/conor-hoekstra/ch-2.bqn b/challenge-327/conor-hoekstra/ch-2.bqn deleted file mode 100644 index 49a89bff11..0000000000 --- a/challenge-327/conor-hoekstra/ch-2.bqn +++ /dev/null @@ -1,12 +0,0 @@ -# For up to date code: -# https://github.com/codereport/bqn-code/blob/main/pwc/327-2.bqn - -u ⇐ •Import "/home/cph/bqn-test/test.bqn" -fn ⇐ •Import "/home/cph/bqn-code/lib/fun.bqn" - -MAD ← (⌊´⊸=|∘-´¨)⊸/fn.Pairs - -# Tests -u.UnitTest (MAD 4‿1‿2‿3) ≡ ⟨⟨4,3⟩,⟨1,2⟩,⟨2,3⟩⟩ -u.UnitTest (MAD 1‿3‿7‿11‿15) ≡ ⟨⟨1,3⟩⟩ -u.UnitTest (MAD 1‿5‿3‿8) ≡ ⟨⟨1,3⟩,⟨5,3⟩⟩ diff --git a/challenge-328/conor-hoekstra/bqn/ch-1.bqn b/challenge-328/conor-hoekstra/bqn/ch-1.bqn new file mode 100644 index 0000000000..8e9c0f3940 --- /dev/null +++ b/challenge-328/conor-hoekstra/bqn/ch-1.bqn @@ -0,0 +1,19 @@ +# For up to date code: +# https://github.com/codereport/bqn-code/blob/main/pwc/328-1.bqn + +u ⇐ •Import "/home/cph/bqn-test/test.bqn" +s ⇐ •Import "/home/cph/bqn-code/lib/string.bqn" +fn ⇐ •Import "/home/cph/bqn-code/lib/fun.bqn" + +Good ← 1=·⌈´·≠¨fn.Group +R ← { + t ← "?" s.Split 𝕩 + ¯1↓∾⥊⍉t≍'a'+•rand.Range¨ 26⥊˜≠t +} +Replace ← { ⊑Good¨⊸/R¨5⥊⋈𝕩 } + +# Tests +u.UnitTest (Good Replace "a?z") ≡ 1 +u.UnitTest (Good Replace "pe?k") ≡ 1 +u.UnitTest (Good Replace "gra?te") ≡ 1 +u.UnitTest (Good Replace "he?lo?world") ≡ 1 diff --git a/challenge-328/conor-hoekstra/bqn/ch-2.bqn b/challenge-328/conor-hoekstra/bqn/ch-2.bqn new file mode 100644 index 0000000000..ca327cbb52 --- /dev/null +++ b/challenge-328/conor-hoekstra/bqn/ch-2.bqn @@ -0,0 +1,14 @@ +# For up to date code: +# https://github.com/codereport/bqn-code/blob/main/pwc/328-2.bqn + +u ⇐ •Import "/home/cph/bqn-test/test.bqn" + +Mask ← { ¬∊⊸∧32=|-´˘2↕-⟜'0'𝕩 } +Good ← ×∘≠◶1‿(∧´Mask) +Adj ← { 2=≠𝕩 ? "" ; 𝕩/˜1∾˜¯1⊸⌽⊸∧Mask 𝕩 } +GoodString ← { Adj•_while_(¬Good) 𝕩 } + +# Tests +u.UnitTest (GoodString "WeEeekly") ≡ "Weekly" +u.UnitTest (GoodString "abBAdD") ≡ "" +u.UnitTest (GoodString "abc") ≡ "abc" diff --git a/challenge-328/conor-hoekstra/ch-1.bqn b/challenge-328/conor-hoekstra/ch-1.bqn deleted file mode 100644 index 8e9c0f3940..0000000000 --- a/challenge-328/conor-hoekstra/ch-1.bqn +++ /dev/null @@ -1,19 +0,0 @@ -# For up to date code: -# https://github.com/codereport/bqn-code/blob/main/pwc/328-1.bqn - -u ⇐ •Import "/home/cph/bqn-test/test.bqn" -s ⇐ •Import "/home/cph/bqn-code/lib/string.bqn" -fn ⇐ •Import "/home/cph/bqn-code/lib/fun.bqn" - -Good ← 1=·⌈´·≠¨fn.Group -R ← { - t ← "?" s.Split 𝕩 - ¯1↓∾⥊⍉t≍'a'+•rand.Range¨ 26⥊˜≠t -} -Replace ← { ⊑Good¨⊸/R¨5⥊⋈𝕩 } - -# Tests -u.UnitTest (Good Replace "a?z") ≡ 1 -u.UnitTest (Good Replace "pe?k") ≡ 1 -u.UnitTest (Good Replace "gra?te") ≡ 1 -u.UnitTest (Good Replace "he?lo?world") ≡ 1 diff --git a/challenge-328/conor-hoekstra/ch-2.bqn b/challenge-328/conor-hoekstra/ch-2.bqn deleted file mode 100644 index ca327cbb52..0000000000 --- a/challenge-328/conor-hoekstra/ch-2.bqn +++ /dev/null @@ -1,14 +0,0 @@ -# For up to date code: -# https://github.com/codereport/bqn-code/blob/main/pwc/328-2.bqn - -u ⇐ •Import "/home/cph/bqn-test/test.bqn" - -Mask ← { ¬∊⊸∧32=|-´˘2↕-⟜'0'𝕩 } -Good ← ×∘≠◶1‿(∧´Mask) -Adj ← { 2=≠𝕩 ? "" ; 𝕩/˜1∾˜¯1⊸⌽⊸∧Mask 𝕩 } -GoodString ← { Adj•_while_(¬Good) 𝕩 } - -# Tests -u.UnitTest (GoodString "WeEeekly") ≡ "Weekly" -u.UnitTest (GoodString "abBAdD") ≡ "" -u.UnitTest (GoodString "abc") ≡ "abc" diff --git a/challenge-329/conor-hoekstra/bqn/ch-1.bqn b/challenge-329/conor-hoekstra/bqn/ch-1.bqn new file mode 100644 index 0000000000..277bb3075f --- /dev/null +++ b/challenge-329/conor-hoekstra/bqn/ch-1.bqn @@ -0,0 +1,12 @@ +# For up to date code: +# https://github.com/codereport/bqn-code/blob/main/pwc/329-1.bqn + +u ⇐ •Import "/home/cph/bqn-test/test.bqn" +s ⇐ •Import "/home/cph/bqn-code/lib/string.bqn" + +CountIntegers ← ⍷s.Nats + +# Tests +u.UnitTest (CountIntegers "the1weekly2challenge2") ≡ ⟨1, 2⟩ +u.UnitTest (CountIntegers "go21od1lu5c7k") ≡ ⟨21, 1, 5, 7⟩ +u.UnitTest (CountIntegers "4p3e2r1l") ≡ ⟨4, 3, 2, 1⟩ diff --git a/challenge-329/conor-hoekstra/bqn/ch-2.bqn b/challenge-329/conor-hoekstra/bqn/ch-2.bqn new file mode 100644 index 0000000000..f8790bb56a --- /dev/null +++ b/challenge-329/conor-hoekstra/bqn/ch-2.bqn @@ -0,0 +1,14 @@ +# For up to date code: +# https://github.com/codereport/bqn-code/blob/main/pwc/329-2.bqn + +u ⇐ •Import "/home/cph/bqn-test/test.bqn" +s ⇐ •Import "/home/cph/bqn-code/lib/string.bqn" +fn ⇐ •Import "/home/cph/bqn-code/lib/fun.bqn" + +IsNice ← { l ← ∧⍷𝕩 ⋄ n ← ⌈2÷˜≠l ⋄ (l↑˜-n)≡s.Lower n↑l } +NiceString ← { ⊑(⌈´⊸=≠¨)⊸/IsNice¨⊸/⍷fn.PowerSet𝕩 } + +# Tests +u.UnitTest (NiceString "YaaAho") ≡ "aaA" +u.UnitTest (NiceString "cC") ≡ "cC" +u.UnitTest (NiceString "A") ≡ "" diff --git a/challenge-329/conor-hoekstra/ch-1.bqn b/challenge-329/conor-hoekstra/ch-1.bqn deleted file mode 100644 index 277bb3075f..0000000000 --- a/challenge-329/conor-hoekstra/ch-1.bqn +++ /dev/null @@ -1,12 +0,0 @@ -# For up to date code: -# https://github.com/codereport/bqn-code/blob/main/pwc/329-1.bqn - -u ⇐ •Import "/home/cph/bqn-test/test.bqn" -s ⇐ •Import "/home/cph/bqn-code/lib/string.bqn" - -CountIntegers ← ⍷s.Nats - -# Tests -u.UnitTest (CountIntegers "the1weekly2challenge2") ≡ ⟨1, 2⟩ -u.UnitTest (CountIntegers "go21od1lu5c7k") ≡ ⟨21, 1, 5, 7⟩ -u.UnitTest (CountIntegers "4p3e2r1l") ≡ ⟨4, 3, 2, 1⟩ diff --git a/challenge-329/conor-hoekstra/ch-2.bqn b/challenge-329/conor-hoekstra/ch-2.bqn deleted file mode 100644 index f8790bb56a..0000000000 --- a/challenge-329/conor-hoekstra/ch-2.bqn +++ /dev/null @@ -1,14 +0,0 @@ -# For up to date code: -# https://github.com/codereport/bqn-code/blob/main/pwc/329-2.bqn - -u ⇐ •Import "/home/cph/bqn-test/test.bqn" -s ⇐ •Import "/home/cph/bqn-code/lib/string.bqn" -fn ⇐ •Import "/home/cph/bqn-code/lib/fun.bqn" - -IsNice ← { l ← ∧⍷𝕩 ⋄ n ← ⌈2÷˜≠l ⋄ (l↑˜-n)≡s.Lower n↑l } -NiceString ← { ⊑(⌈´⊸=≠¨)⊸/IsNice¨⊸/⍷fn.PowerSet𝕩 } - -# Tests -u.UnitTest (NiceString "YaaAho") ≡ "aaA" -u.UnitTest (NiceString "cC") ≡ "cC" -u.UnitTest (NiceString "A") ≡ "" diff --git a/challenge-330/conor-hoekstra/bqn/ch-1.bqn b/challenge-330/conor-hoekstra/bqn/ch-1.bqn new file mode 100644 index 0000000000..5ad557215e --- /dev/null +++ b/challenge-330/conor-hoekstra/bqn/ch-1.bqn @@ -0,0 +1,14 @@ +# For up to date code: +# https://github.com/codereport/bqn-code/blob/main/pwc/330-1.bqn + +u ⇐ •Import "/home/cph/bqn-test/test.bqn" +s ⇐ •Import "/home/cph/bqn-code/lib/string.bqn" + +Bad ← { ∨´s.IsDigit¨𝕩 } +Fix ← { 𝕩/˜¬(↕≠𝕩)∊¯1‿0+⊑/s.IsDigit¨𝕩 } +ClearDigits ← { Fix•_while_ Bad 𝕩 } + +# Tests +u.UnitTest (ClearDigits "cab12") ≡ "c" +u.UnitTest (ClearDigits "xy99") ≡ "" +u.UnitTest (ClearDigits "pa1erl") ≡ "perl" diff --git a/challenge-330/conor-hoekstra/bqn/ch-2.bqn b/challenge-330/conor-hoekstra/bqn/ch-2.bqn new file mode 100644 index 0000000000..6ce167b686 --- /dev/null +++ b/challenge-330/conor-hoekstra/bqn/ch-2.bqn @@ -0,0 +1,16 @@ +# For up to date code: +# https://github.com/codereport/bqn-code/blob/main/pwc/330-2.bqn + +u ⇐ •Import "/home/cph/bqn-test/test.bqn" +s ⇐ •Import "/home/cph/bqn-code/lib/string.bqn" + +TitleCapital ← { s.Unwords (2<≠)◶⊢‿(s.Upper⌾⊑)¨ s.Words s.Lower 𝕩 } # Explicit +TitleCapital2 ← s.Unwords·(2<≠)◶⊢‿(s.Upper⌾⊑)¨·s.Words s.Lower # Tacit + +# Tests +u.UnitTest (TitleCapital "PERL IS gREAT") ≡ "Perl is Great" +u.UnitTest (TitleCapital "THE weekly challenge") ≡ "The Weekly Challenge" +u.UnitTest (TitleCapital "YoU ARE A stAR") ≡ "You Are a Star" +u.UnitTest (TitleCapital2 "PERL IS gREAT") ≡ "Perl is Great" +u.UnitTest (TitleCapital2 "THE weekly challenge") ≡ "The Weekly Challenge" +u.UnitTest (TitleCapital2 "YoU ARE A stAR") ≡ "You Are a Star" diff --git a/challenge-330/conor-hoekstra/ch-1.bqn b/challenge-330/conor-hoekstra/ch-1.bqn deleted file mode 100644 index 5ad557215e..0000000000 --- a/challenge-330/conor-hoekstra/ch-1.bqn +++ /dev/null @@ -1,14 +0,0 @@ -# For up to date code: -# https://github.com/codereport/bqn-code/blob/main/pwc/330-1.bqn - -u ⇐ •Import "/home/cph/bqn-test/test.bqn" -s ⇐ •Import "/home/cph/bqn-code/lib/string.bqn" - -Bad ← { ∨´s.IsDigit¨𝕩 } -Fix ← { 𝕩/˜¬(↕≠𝕩)∊¯1‿0+⊑/s.IsDigit¨𝕩 } -ClearDigits ← { Fix•_while_ Bad 𝕩 } - -# Tests -u.UnitTest (ClearDigits "cab12") ≡ "c" -u.UnitTest (ClearDigits "xy99") ≡ "" -u.UnitTest (ClearDigits "pa1erl") ≡ "perl" diff --git a/challenge-330/conor-hoekstra/ch-2.bqn b/challenge-330/conor-hoekstra/ch-2.bqn deleted file mode 100644 index 6ce167b686..0000000000 --- a/challenge-330/conor-hoekstra/ch-2.bqn +++ /dev/null @@ -1,16 +0,0 @@ -# For up to date code: -# https://github.com/codereport/bqn-code/blob/main/pwc/330-2.bqn - -u ⇐ •Import "/home/cph/bqn-test/test.bqn" -s ⇐ •Import "/home/cph/bqn-code/lib/string.bqn" - -TitleCapital ← { s.Unwords (2<≠)◶⊢‿(s.Upper⌾⊑)¨ s.Words s.Lower 𝕩 } # Explicit -TitleCapital2 ← s.Unwords·(2<≠)◶⊢‿(s.Upper⌾⊑)¨·s.Words s.Lower # Tacit - -# Tests -u.UnitTest (TitleCapital "PERL IS gREAT") ≡ "Perl is Great" -u.UnitTest (TitleCapital "THE weekly challenge") ≡ "The Weekly Challenge" -u.UnitTest (TitleCapital "YoU ARE A stAR") ≡ "You Are a Star" -u.UnitTest (TitleCapital2 "PERL IS gREAT") ≡ "Perl is Great" -u.UnitTest (TitleCapital2 "THE weekly challenge") ≡ "The Weekly Challenge" -u.UnitTest (TitleCapital2 "YoU ARE A stAR") ≡ "You Are a Star" diff --git a/challenge-331/conor-hoekstra/bqn/ch-1.bqn b/challenge-331/conor-hoekstra/bqn/ch-1.bqn new file mode 100644 index 0000000000..09610d2384 --- /dev/null +++ b/challenge-331/conor-hoekstra/bqn/ch-1.bqn @@ -0,0 +1,12 @@ +# For up to date code: +# https://github.com/codereport/bqn-code/blob/main/pwc/331-1.bqn + +u ⇐ •Import "/home/cph/bqn-test/test.bqn" +s ⇐ •Import "/home/cph/bqn-code/lib/string.bqn" + +LastWordLength ← ≠·⊢´s.Words + +# Tests +u.UnitTest (LastWordLength "The Weekly Challenge") ≡ 9 +u.UnitTest (LastWordLength " Hello World ") ≡ 5 +u.UnitTest (LastWordLength "Let's begin the fun") ≡ 3 diff --git a/challenge-331/conor-hoekstra/bqn/ch-2.bqn b/challenge-331/conor-hoekstra/bqn/ch-2.bqn new file mode 100644 index 0000000000..b78af76790 --- /dev/null +++ b/challenge-331/conor-hoekstra/bqn/ch-2.bqn @@ -0,0 +1,16 @@ +# For up to date code: +# https://github.com/codereport/bqn-code/blob/main/pwc/331-2.bqn + +u ⇐ •Import "/home/cph/bqn-test/test.bqn" +fn ⇐ •Import "/home/cph/bqn-code/lib/fun.bqn" + +Dup ← 1=·⌈´⊒ +MatchAndDup ← ≡∧Dup∘⊢ +Swappable ← (≠/⊣)((4=≠∘∾)∧≡)(⌽≠/⊢) +BuddyStrings ← Swappable ∨ MatchAndDup + +# Tests +u.UnitTest ("fuck" BuddyStrings "fcuk") ≡ 1 +u.UnitTest ("love" BuddyStrings "love") ≡ 0 +u.UnitTest ("fodo" BuddyStrings "food") ≡ 1 +u.UnitTest ("feed" BuddyStrings "feed") ≡ 1 diff --git a/challenge-331/conor-hoekstra/ch-1.bqn b/challenge-331/conor-hoekstra/ch-1.bqn deleted file mode 100644 index 09610d2384..0000000000 --- a/challenge-331/conor-hoekstra/ch-1.bqn +++ /dev/null @@ -1,12 +0,0 @@ -# For up to date code: -# https://github.com/codereport/bqn-code/blob/main/pwc/331-1.bqn - -u ⇐ •Import "/home/cph/bqn-test/test.bqn" -s ⇐ •Import "/home/cph/bqn-code/lib/string.bqn" - -LastWordLength ← ≠·⊢´s.Words - -# Tests -u.UnitTest (LastWordLength "The Weekly Challenge") ≡ 9 -u.UnitTest (LastWordLength " Hello World ") ≡ 5 -u.UnitTest (LastWordLength "Let's begin the fun") ≡ 3 diff --git a/challenge-331/conor-hoekstra/ch-2.bqn b/challenge-331/conor-hoekstra/ch-2.bqn deleted file mode 100644 index b78af76790..0000000000 --- a/challenge-331/conor-hoekstra/ch-2.bqn +++ /dev/null @@ -1,16 +0,0 @@ -# For up to date code: -# https://github.com/codereport/bqn-code/blob/main/pwc/331-2.bqn - -u ⇐ •Import "/home/cph/bqn-test/test.bqn" -fn ⇐ •Import "/home/cph/bqn-code/lib/fun.bqn" - -Dup ← 1=·⌈´⊒ -MatchAndDup ← ≡∧Dup∘⊢ -Swappable ← (≠/⊣)((4=≠∘∾)∧≡)(⌽≠/⊢) -BuddyStrings ← Swappable ∨ MatchAndDup - -# Tests -u.UnitTest ("fuck" BuddyStrings "fcuk") ≡ 1 -u.UnitTest ("love" BuddyStrings "love") ≡ 0 -u.UnitTest ("fodo" BuddyStrings "food") ≡ 1 -u.UnitTest ("feed" BuddyStrings "feed") ≡ 1 diff --git a/challenge-332/conor-hoekstra/bqn/ch-1.bqn b/challenge-332/conor-hoekstra/bqn/ch-1.bqn new file mode 100644 index 0000000000..599b81e01d --- /dev/null +++ b/challenge-332/conor-hoekstra/bqn/ch-1.bqn @@ -0,0 +1,13 @@ +# For up to date code: +# https://github.com/codereport/bqn-code/blob/main/pwc/332-1.bqn + +u ⇐ •Import "/home/cph/bqn-test/test.bqn" +b ⇐ •Import "/home/cph/bqn-code/lib/binary.bqn" +s ⇐ •Import "/home/cph/bqn-code/lib/string.bqn" + +BinaryDate ← { "-" s.Join (∾•Fmt¨)¨ b.Binary¨ s.Nats 𝕩 } + +# Tests +u.UnitTest (BinaryDate "2025-07-26") ≡ "11111101001-111-11010" +u.UnitTest (BinaryDate "2000-02-02") ≡ "11111010000-10-10" +u.UnitTest (BinaryDate "2024-12-31") ≡ "11111101000-1100-11111" diff --git a/challenge-332/conor-hoekstra/bqn/ch-2.bqn b/challenge-332/conor-hoekstra/bqn/ch-2.bqn new file mode 100644 index 0000000000..c7dd75f124 --- /dev/null +++ b/challenge-332/conor-hoekstra/bqn/ch-2.bqn @@ -0,0 +1,12 @@ +# For up to date code: +# https://github.com/codereport/bqn-code/blob/main/pwc/332-2.bqn + +u ⇐ •Import "/home/cph/bqn-test/test.bqn" +fn ⇐ •Import "/home/cph/bqn-code/lib/fun.bqn" + +OddLetters ← ∧´2|·≠¨·fn.Group∧ + +# Tests +u.UnitTest (OddLetters "weekly") ≡ 0 +u.UnitTest (OddLetters "perl") ≡ 1 +u.UnitTest (OddLetters "challenge") ≡ 0 diff --git a/challenge-332/conor-hoekstra/ch-1.bqn b/challenge-332/conor-hoekstra/ch-1.bqn deleted file mode 100644 index 599b81e01d..0000000000 --- a/challenge-332/conor-hoekstra/ch-1.bqn +++ /dev/null @@ -1,13 +0,0 @@ -# For up to date code: -# https://github.com/codereport/bqn-code/blob/main/pwc/332-1.bqn - -u ⇐ •Import "/home/cph/bqn-test/test.bqn" -b ⇐ •Import "/home/cph/bqn-code/lib/binary.bqn" -s ⇐ •Import "/home/cph/bqn-code/lib/string.bqn" - -BinaryDate ← { "-" s.Join (∾•Fmt¨)¨ b.Binary¨ s.Nats 𝕩 } - -# Tests -u.UnitTest (BinaryDate "2025-07-26") ≡ "11111101001-111-11010" -u.UnitTest (BinaryDate "2000-02-02") ≡ "11111010000-10-10" -u.UnitTest (BinaryDate "2024-12-31") ≡ "11111101000-1100-11111" diff --git a/challenge-332/conor-hoekstra/ch-2.bqn b/challenge-332/conor-hoekstra/ch-2.bqn deleted file mode 100644 index c7dd75f124..0000000000 --- a/challenge-332/conor-hoekstra/ch-2.bqn +++ /dev/null @@ -1,12 +0,0 @@ -# For up to date code: -# https://github.com/codereport/bqn-code/blob/main/pwc/332-2.bqn - -u ⇐ •Import "/home/cph/bqn-test/test.bqn" -fn ⇐ •Import "/home/cph/bqn-code/lib/fun.bqn" - -OddLetters ← ∧´2|·≠¨·fn.Group∧ - -# Tests -u.UnitTest (OddLetters "weekly") ≡ 0 -u.UnitTest (OddLetters "perl") ≡ 1 -u.UnitTest (OddLetters "challenge") ≡ 0 diff --git a/challenge-332/eric-cheung/python/ch-1.py b/challenge-332/eric-cheung/python/ch-1.py new file mode 100755 index 0000000000..08082990c1 --- /dev/null +++ b/challenge-332/eric-cheung/python/ch-1.py @@ -0,0 +1,8 @@ + +## strInputDate = "2025-07-26" ## Example 1 +## strInputDate = "2000-02-02" ## Example 2 +strInputDate = "2024-12-31" ## Example 3 + +arrBinDate = ["{0:b}".format(int(strElem)) for strElem in strInputDate.split("-")] + +print ("-".join(arrBinDate)) diff --git a/challenge-332/eric-cheung/python/ch-2.py b/challenge-332/eric-cheung/python/ch-2.py new file mode 100755 index 0000000000..15f4df85a9 --- /dev/null +++ b/challenge-332/eric-cheung/python/ch-2.py @@ -0,0 +1,8 @@ + +## strInput = "weekly" ## Example 1 +## strInput = "perl" ## Example 2 +strInput = "challenge" ## Example 3 + +arrSet = [charLoop for charLoop in set(strInput) if strInput.count(charLoop) % 2 == 0] + +print (len(arrSet) == 0) diff --git a/challenge-332/ulrich-rieke/cpp/ch-1.cpp b/challenge-332/ulrich-rieke/cpp/ch-1.cpp new file mode 100755 index 0000000000..0af0824971 --- /dev/null +++ b/challenge-332/ulrich-rieke/cpp/ch-1.cpp @@ -0,0 +1,49 @@ +#include +#include +#include +#include +#include + +std::vector split( const std::string & text , char delimiter ) { + std::vector tokens ; + std::istringstream istr { text } ; + std::string word ; + while ( std::getline( istr , word , delimiter ) ) + tokens.push_back( word ) ; + return tokens ; +} + +std::string to_binary_string( int part ) { + std::string binary ; + while ( part != 0 ) { + if ( part % 2 == 1 ) { + binary.push_back( '1' ) ; + } + else { + binary.push_back( '0' ) ; + } + part /= 2 ; + } + std::reverse( binary.begin( ) , binary.end( )) ; + return binary ; +} + +int main( ) { + std::cout << "Enter a date as year-month-day!\n" ; + std::string date ; + std::getline( std::cin , date ) ; + auto dateparts { split( date , '-' ) } ; + std::vector transformed ; + for ( auto part : dateparts ) { + int numdate = std::stoi( part ) ; + transformed.push_back( to_binary_string( numdate ) ) ; + } + std::string solution ; + for ( auto s : transformed ) { + solution += s ; + solution.push_back( '-' ) ; + } + solution.pop_back( ) ; + std::cout << solution << '\n' ; + return 0 ; +} diff --git a/challenge-332/ulrich-rieke/cpp/ch-2.cpp b/challenge-332/ulrich-rieke/cpp/ch-2.cpp new file mode 100755 index 0000000000..272df141ee --- /dev/null +++ b/challenge-332/ulrich-rieke/cpp/ch-2.cpp @@ -0,0 +1,17 @@ +#include +#include +#include +#include + +int main( ) { + std::cout << "Enter a word!\n" ; + std::string word ; + std::getline( std::cin , word ) ; + std::map frequencies ; + for ( char c : word ) + frequencies[c]++ ; + std::cout << std::boolalpha << std::all_of( frequencies.begin( ) , + frequencies.end( ) , []( const auto & p ) { return p.second % 2 == + 1 ; } ) << '\n' ; + return 0 ; +} diff --git a/challenge-332/ulrich-rieke/haskell/ch-1.hs b/challenge-332/ulrich-rieke/haskell/ch-1.hs new file mode 100755 index 0000000000..ed4190b6a1 --- /dev/null +++ b/challenge-332/ulrich-rieke/haskell/ch-1.hs @@ -0,0 +1,20 @@ +module Challenge332 + where +import Data.List ( intercalate ) +import Data.List.Split ( splitOn ) + +toBinaryString :: Int -> String +toBinaryString part = reverse $ snd $ until ( (== 0 ). fst ) step ( part ,"" ) + where + step :: (Int , String) -> (Int , String ) + step ( currentNumber, binary ) = ( div currentNumber 2 , binary ++ + show ( mod currentNumber 2 ) ) + +convert :: String -> String +convert = intercalate "-" . map ( toBinaryString . read ) . splitOn "-" + +main :: IO ( ) +main = do + putStrLn "Enter a date in the form year-month-day!" + date <- getLine + print $ convert date diff --git a/challenge-332/ulrich-rieke/haskell/ch-2.hs b/challenge-332/ulrich-rieke/haskell/ch-2.hs new file mode 100755 index 0000000000..d8deaf60a0 --- /dev/null +++ b/challenge-332/ulrich-rieke/haskell/ch-2.hs @@ -0,0 +1,18 @@ +module Challenge332_2 + where +import qualified Data.Set as S + +count :: Eq a => a -> [a] -> Int +count _ [] = 0 +count d ( x:xs ) + |d == x = 1 + count d xs + |otherwise = count d xs + +solution :: String -> Bool +solution word = all odd $ map (\l -> count l word ) $ S.toList $ S.fromList word + +main :: IO ( ) +main = do + putStrLn "Enter a word!" + word <- getLine + print $ solution word diff --git a/challenge-332/ulrich-rieke/perl/ch-1.pl b/challenge-332/ulrich-rieke/perl/ch-1.pl new file mode 100755 index 0000000000..f1fc7a9069 --- /dev/null +++ b/challenge-332/ulrich-rieke/perl/ch-1.pl @@ -0,0 +1,11 @@ +#!/usr/bin/perl ; +use strict ; +use warnings ; +use feature 'say' ; + +say "Enter a date as year-month-day!" ; +my $date = ; +chomp $date ; +my @dateparts = split( /\-/ , $date ) ; +my @transformed = map { sprintf("%b" , $_) } @dateparts ; +say join( '-' , @transformed ) ; diff --git a/challenge-332/ulrich-rieke/perl/ch-2.pl b/challenge-332/ulrich-rieke/perl/ch-2.pl new file mode 100755 index 0000000000..4f8581a6c9 --- /dev/null +++ b/challenge-332/ulrich-rieke/perl/ch-2.pl @@ -0,0 +1,17 @@ +#!/usr/bin/perl ; +use strict ; +use warnings ; +use feature 'say' ; +use List::Util qw ( all ) ; + +say "Enter a word!" ; +my $word = ; +chomp $word ; +my %frequencies ; +map { $frequencies{$_}++ } split( // , $word ) ; +if ( all { $_ % 2 == 1 } values %frequencies ) { + say "true" ; +} +else { + say "false" ; +} diff --git a/challenge-332/ulrich-rieke/raku/ch-1.raku b/challenge-332/ulrich-rieke/raku/ch-1.raku new file mode 100755 index 0000000000..13c56719f8 --- /dev/null +++ b/challenge-332/ulrich-rieke/raku/ch-1.raku @@ -0,0 +1,7 @@ +use v6 ; + +say "Enter a date as year-month-day!" ; +my $date = $*IN.get ; +my @dateparts = $date.split( / '-' / ) ; +my @transformed = @dateparts.map( { (+$_).base( 2 ) } ) ; +say @transformed.join( '-' ) ; diff --git a/challenge-332/ulrich-rieke/raku/ch-2.raku b/challenge-332/ulrich-rieke/raku/ch-2.raku new file mode 100755 index 0000000000..4ff5f5c8e4 --- /dev/null +++ b/challenge-332/ulrich-rieke/raku/ch-2.raku @@ -0,0 +1,7 @@ +use v6 ; + +say "Enter a word!" ; +my $word = $*IN.get ; +my %frequencies ; +$word.comb.map( {%frequencies{$_}++ } ) ; +say %frequencies.values.elems == %frequencies.values.grep( {$_ % 2 == 1} ).elems; diff --git a/challenge-332/ulrich-rieke/rust/ch-1.rs b/challenge-332/ulrich-rieke/rust/ch-1.rs new file mode 100755 index 0000000000..389c07e8b4 --- /dev/null +++ b/challenge-332/ulrich-rieke/rust/ch-1.rs @@ -0,0 +1,30 @@ +use std::io ; + +fn to_binary_string( date : &str ) -> String { + let mut binary : String = String::new( ) ; + let mut date_num : usize = date.parse::( ).unwrap( ) ; + while date_num != 0 { + if date_num % 2 == 1 { + binary.insert_str( 0 , "1" ) ; + } + else { + binary.insert_str( 0 , "0" ) ; + } + date_num /= 2 ; + } + binary +} + +fn main() { + println!("Enter a date as year-month-day!"); + let mut inline : String = String::new( ) ; + io::stdin( ).read_line( &mut inline ).unwrap( ) ; + let parts : Vec<&str> = inline.trim( ).split( "-" ).collect( ) ; + let mut result : String = String::new( ) ; + parts.into_iter( ).map( |s| to_binary_string( s ) ).for_each( |date| { + result += &date[..] ; + result.push( '-' ) ; + } ) ; + result.pop( ) ; + println!("{:?}" , result ) ; +} diff --git a/challenge-332/ulrich-rieke/rust/ch-2.rs b/challenge-332/ulrich-rieke/rust/ch-2.rs new file mode 100755 index 0000000000..f9001cf8d5 --- /dev/null +++ b/challenge-332/ulrich-rieke/rust/ch-2.rs @@ -0,0 +1,14 @@ +use std::io ; +use std::collections::HashMap ; + +fn main() { + println!("Enter a word!"); + let mut inline : String = String::new( ) ; + io::stdin( ).read_line( &mut inline ).unwrap( ) ; + let mut frequencies : HashMap = HashMap::new( ) ; + for c in inline.trim( ).chars( ) { + frequencies.entry( c ).and_modify( |counter| *counter += 1 ). + or_insert( 1 ) ; + } + println!("{}" , frequencies.values( ).all( |n| n % 2 == 1 ) ) ; +} diff --git a/stats/pwc-challenge-331.json b/stats/pwc-challenge-331.json new file mode 100644 index 0000000000..fd040ad2e2 --- /dev/null +++ b/stats/pwc-challenge-331.json @@ -0,0 +1,645 @@ +{ + "chart" : { + "type" : "column" + }, + "drilldown" : { + "series" : [ + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Alexander Karelas", + "name" : "Alexander Karelas" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Ali Moradi", + "name" : "Ali Moradi" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Andreas Mahnke", + "name" : "Andreas Mahnke" + }, + { + "data" : [ + [ + "Raku", + 2 + ] + ], + "id" : "Andrew Shitov", + "name" : "Andrew Shitov" + }, + { + "data" : [ + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Arne Sommer", + "name" : "Arne Sommer" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ], + "id" : "Athanasius", + "name" : "Athanasius" + }, + { + "data" : [ + [ + "Raku", + 1 + ] + ], + "id" : "BarrOff", + "name" : "BarrOff" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Bob Lied", + "name" : "Bob Lied" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "David Ferrone", + "name" : "David Ferrone" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "E. Choroba", + "name" : "E. Choroba" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Fabio Valeri", + "name" : "Fabio Valeri" + }, + { + "data" : [ + [ + "Raku", + 2 + ] + ], + "id" : "Feng Chang", + "name" : "Feng Chang" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Jaldhar H. Vyas", + "name" : "Jaldhar H. Vyas" + }, + { + "data" : [ + [ + "Raku", + 2 + ] + ], + "id" : "Jan Krnavek", + "name" : "Jan Krnavek" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Jorg Sommrey", + "name" : "Jorg Sommrey" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Kjetil Skotheim", + "name" : "Kjetil Skotheim" + }, + { + "data" : [ + [ + "Raku", + 2 + ], + [ + "Blog", + 10 + ] + ], + "id" : "Luca Ferrari", + "name" : "Luca Ferrari" + }, + { + "data" : [ + [ + "Raku", + 2 + ] + ], + "id" : "Mark Anderson", + "name" : "Mark Anderson" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Matthew Neleigh", + "name" : "Matthew Neleigh" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Matthias Muth", + "name" : "Matthias Muth" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "mauke", + "name" : "mauke" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Niels van Dijke", + "name" : "Niels van Dijke" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Packy Anderson", + "name" : "Packy Anderson" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Peter Campbell Smith", + "name" : "Peter Campbell Smith" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Peter Meszaros", + "name" : "Peter Meszaros" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Robbie Hatley", + "name" : "Robbie Hatley" + }, + { + "data" : [ + [ + "Raku", + 2 + ] + ], + "id" : "Robert Ransbottom", + "name" : "Robert Ransbottom" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Roger Bell_West", + "name" : "Roger Bell_West" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Simon Green", + "name" : "Simon Green" + }, + { + "data" : [ + [ + "Raku", + 2 + ] + ], + "id" : "Simon Proctor", + "name" : "Simon Proctor" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 2 + ] + ], + "id" : "Thomas Kohler", + "name" : "Thomas Kohler" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ], + "id" : "Ulrich Rieke", + "name" : "Ulrich Rieke" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "W. Luis Mochan", + "name" : "W. Luis Mochan" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Wanderdoc", + "name" : "Wanderdoc" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Yitzchak Scott-Thoennes", + "name" : "Yitzchak Scott-Thoennes" + } + ] + }, + "legend" : { + "enabled" : 0 + }, + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "enabled" : 1, + "format" : "{point.y}" + } + } + }, + "series" : [ + { + "colorByPoint" : 1, + "data" : [ + { + "drilldown" : "Alexander Karelas", + "name" : "Alexander Karelas", + "y" : 2 + }, + { + "drilldown" : "Ali Moradi", + "name" : "Ali Moradi", + "y" : 3 + }, + { + "drilldown" : "Andreas Mahnke", + "name" : "Andreas Mahnke", + "y" : 2 + }, + { + "drilldown" : "Andrew Shitov", + "name" : "Andrew Shitov", + "y" : 2 + }, + { + "drilldown" : "Arne Sommer", + "name" : "Arne Sommer", + "y" : 3 + }, + { + "drilldown" : "Athanasius", + "name" : "Athanasius", + "y" : 4 + }, + { + "drilldown" : "BarrOff", + "name" : "BarrOff", + "y" : 1 + }, + { + "drilldown" : "Bob Lied", + "name" : "Bob Lied", + "y" : 2 + }, + { + "drilldown" : "David Ferrone", + "name" : "David Ferrone", + "y" : 2 + }, + { + "drilldown" : "E. Choroba", + "name" : "E. Choroba", + "y" : 2 + }, + { + "drilldown" : "Fabio Valeri", + "name" : "Fabio Valeri", + "y" : 2 + }, + { + "drilldown" : "Feng Chang", + "name" : "Feng Chang", + "y" : 2 + }, + { + "drilldown" : "Jaldhar H. Vyas", + "name" : "Jaldhar H. Vyas", + "y" : 5 + }, + { + "drilldown" : "Jan Krnavek", + "name" : "Jan Krnavek", + "y" : 2 + }, + { + "drilldown" : "Jorg Sommrey", + "name" : "Jorg Sommrey", + "y" : 3 + }, + { + "drilldown" : "Kjetil Skotheim", + "name" : "Kjetil Skotheim", + "y" : 2 + }, + { + "drilldown" : "Luca Ferrari", + "name" : "Luca Ferrari", + "y" : 12 + }, + { + "drilldown" : "Mark Anderson", + "name" : "Mark Anderson", + "y" : 2 + }, + { + "drilldown" : "Matthew Neleigh", + "name" : "Matthew Neleigh", + "y" : 2 + }, + { + "drilldown" : "Matthias Muth", + "name" : "Matthias Muth", + "y" : 3 + }, + { + "drilldown" : "mauke", + "name" : "mauke", + "y" : 2 + }, + { + "drilldown" : "Niels van Dijke", + "name" : "Niels van Dijke", + "y" : 2 + }, + { + "drilldown" : "Packy Anderson", + "name" : "Packy Anderson", + "y" : 5 + }, + { + "drilldown" : "Peter Campbell Smith", + "name" : "Peter Campbell Smith", + "y" : 3 + }, + { + "drilldown" : "Peter Meszaros", + "name" : "Peter Meszaros", + "y" : 2 + }, + { + "drilldown" : "Robbie Hatley", + "name" : "Robbie Hatley", + "y" : 3 + }, + { + "drilldown" : "Robert Ransbottom", + "name" : "Robert Ransbottom", + "y" : 2 + }, + { + "drilldown" : "Roger Bell_West", + "name" : "Roger Bell_West", + "y" : 5 + }, + { + "drilldown" : "Simon Green", + "name" : "Simon Green", + "y" : 3 + }, + { + "drilldown" : "Simon Proctor", + "name" : "Simon Proctor", + "y" : 2 + }, + { + "drilldown" : "Thomas Kohler", + "name" : "Thomas Kohler", + "y" : 4 + }, + { + "drilldown" : "Ulrich Rieke", + "name" : "Ulrich Rieke", + "y" : 4 + }, + { + "drilldown" : "W. Luis Mochan", + "name" : "W. Luis Mochan", + "y" : 3 + }, + { + "drilldown" : "Wanderdoc", + "name" : "Wanderdoc", + "y" : 2 + }, + { + "drilldown" : "Yitzchak Scott-Thoennes", + "name" : "Yitzchak Scott-Thoennes", + "y" : 2 + } + ], + "name" : "The Weekly Challenge - 331" + } + ], + "subtitle" : { + "text" : "[Champions: 35] Last updated at 2025-07-31 10:32:18 GMT" + }, + "title" : { + "text" : "The Weekly Challenge - 331" + }, + "tooltip" : { + "followPointer" : 1, + "headerFormat" : "{series.name}
", + "pointFormat" : "{point.name}: {point.y:f}
" + }, + "xAxis" : { + "type" : "category" + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + } +} diff --git a/stats/pwc-current.json b/stats/pwc-current.json index 001fe36430..cb363debba 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -4,16 +4,6 @@ }, "drilldown" : { "series" : [ - { - "data" : [ - [ - "Perl", - 2 - ] - ], - "id" : "Alexander Karelas", - "name" : "Alexander Karelas" - }, { "data" : [ [ @@ -28,16 +18,6 @@ "id" : "Ali Moradi", "name" : "Ali Moradi" }, - { - "data" : [ - [ - "Perl", - 2 - ] - ], - "id" : "Andreas Mahnke", - "name" : "Andreas Mahnke" - }, { "data" : [ [ @@ -76,21 +56,15 @@ "id" : "Athanasius", "name" : "Athanasius" }, - { - "data" : [ - [ - "Raku", - 1 - ] - ], - "id" : "BarrOff", - "name" : "BarrOff" - }, { "data" : [ [ "Perl", 2 + ], + [ + "Blog", + 1 ] ], "id" : "Bob Lied", @@ -116,16 +90,6 @@ "id" : "E. Choroba", "name" : "E. Choroba" }, - { - "data" : [ - [ - "Perl", - 2 - ] - ], - "id" : "Fabio Valeri", - "name" : "Fabio Valeri" - }, { "data" : [ [ @@ -154,54 +118,6 @@ "id" : "Jaldhar H. Vyas", "name" : "Jaldhar H. Vyas" }, - { - "data" : [ - [ - "Raku", - 2 - ] - ], - "id" : "Jan Krnavek", - "name" : "Jan Krnavek" - }, - { - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", - 1 - ] - ], - "id" : "Jorg Sommrey", - "name" : "Jorg Sommrey" - }, - { - "data" : [ - [ - "Perl", - 2 - ] - ], - "id" : "Kjetil Skotheim", - "name" : "Kjetil Skotheim" - }, - { - "data" : [ - [ - "Raku", - 2 - ], - [ - "Blog", - 10 - ] - ], - "id" : "Luca Ferrari", - "name" : "Luca Ferrari" - }, { "data" : [ [ @@ -212,30 +128,6 @@ "id" : "Mark Anderson", "name" : "Mark Anderson"