diff options
| author | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2024-02-16 20:22:00 +0000 |
|---|---|---|
| committer | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2024-02-16 20:22:00 +0000 |
| commit | 30af08597ed66aa4ef79951398dd61d6f4a2be75 (patch) | |
| tree | da2bb785381134db5620acccf420a8943652cc2d | |
| parent | 7f565e10804ed0621cbd2818c1176c24caf2d2fc (diff) | |
| download | perlweeklychallenge-club-30af08597ed66aa4ef79951398dd61d6f4a2be75.tar.gz perlweeklychallenge-club-30af08597ed66aa4ef79951398dd61d6f4a2be75.tar.bz2 perlweeklychallenge-club-30af08597ed66aa4ef79951398dd61d6f4a2be75.zip | |
- Added solutions by David Ferrone.
- Added solutions by Packy Anderson.
- Added solutions by Robbie Hatley.
- Added solutions by Jorg Sommrey.
- Added solutions by W. Luis Mochan.
- Added solutions by Laurent Rosenfeld.
| -rw-r--r-- | challenge-256/laurent-rosenfeld/julia/ch-1.jl | 22 | ||||
| -rw-r--r-- | challenge-256/laurent-rosenfeld/julia/ch-2.jl | 29 | ||||
| -rw-r--r-- | stats/pwc-current.json | 230 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown-summary.json | 52 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown.json | 1752 | ||||
| -rw-r--r-- | stats/pwc-leaders.json | 370 | ||||
| -rw-r--r-- | stats/pwc-summary-1-30.json | 54 | ||||
| -rw-r--r-- | stats/pwc-summary-121-150.json | 44 | ||||
| -rw-r--r-- | stats/pwc-summary-151-180.json | 90 | ||||
| -rw-r--r-- | stats/pwc-summary-181-210.json | 48 | ||||
| -rw-r--r-- | stats/pwc-summary-211-240.json | 48 | ||||
| -rw-r--r-- | stats/pwc-summary-241-270.json | 104 | ||||
| -rw-r--r-- | stats/pwc-summary-271-300.json | 102 | ||||
| -rw-r--r-- | stats/pwc-summary-301-330.json | 60 | ||||
| -rw-r--r-- | stats/pwc-summary-31-60.json | 42 | ||||
| -rw-r--r-- | stats/pwc-summary-61-90.json | 102 | ||||
| -rw-r--r-- | stats/pwc-summary-91-120.json | 42 | ||||
| -rw-r--r-- | stats/pwc-summary.json | 654 |
18 files changed, 1969 insertions, 1876 deletions
diff --git a/challenge-256/laurent-rosenfeld/julia/ch-1.jl b/challenge-256/laurent-rosenfeld/julia/ch-1.jl new file mode 100644 index 0000000000..56a23ae41e --- /dev/null +++ b/challenge-256/laurent-rosenfeld/julia/ch-1.jl @@ -0,0 +1,22 @@ +using Printf + +function find_pairs(in) + nb_pairs = 0 + for i in 1:size(in, 1) + for j in i+1:size(in, 1) + if in[i] == reverse(in[j]) + nb_pairs += 1 + end + end + end + return nb_pairs +end + +tests = [ ["ab", "de", "ed", "bc"], + ["aa", "ba", "cd", "ed"], + ["uv", "qp", "st", "vu", "mn", "pq"] ] + +for test in tests + @printf "%-40s => " "$test" + println(find_pairs(test)) +end diff --git a/challenge-256/laurent-rosenfeld/julia/ch-2.jl b/challenge-256/laurent-rosenfeld/julia/ch-2.jl new file mode 100644 index 0000000000..676bef21c7 --- /dev/null +++ b/challenge-256/laurent-rosenfeld/julia/ch-2.jl @@ -0,0 +1,29 @@ +using Printf + +function merge_strings(str1, str2) + result = [] + let1 = split(str1, "") + let2 = split(str2, "") + size1 = size(let1, 1) + size2 = size(let2, 1) + last_i = size1 > size2 ? size2 : size1 + for i in 1:last_i + push!(result, let1[i], let2[i]) + end + if size1 > size2 + for i in last_i + 1:size1 + push!(result, let1[i]) + end + else + for i in last_i + 1:size2 + push!(result, let2[i]) + end + end + return join(result, ""); +end + +tests = [["abcd", "1234"], ["abc", "12345"], ["abcde", "123"]] +for test in tests + @printf "%-18s => " "$test" + println(merge_strings(test[1], test[2])) +end diff --git a/stats/pwc-current.json b/stats/pwc-current.json index 1f457c1696..703622b58c 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,6 +1,8 @@ { - "subtitle" : { - "text" : "[Champions: 24] Last updated at 2024-02-15 19:27:48 GMT" + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } }, "drilldown" : { "series" : [ @@ -15,18 +17,18 @@ 1 ] ], - "name" : "Ali Moradi", - "id" : "Ali Moradi" + "id" : "Ali Moradi", + "name" : "Ali Moradi" }, { + "name" : "Andrew Shitov", + "id" : "Andrew Shitov", "data" : [ [ "Raku", 2 ] - ], - "id" : "Andrew Shitov", - "name" : "Andrew Shitov" + ] }, { "data" : [ @@ -43,8 +45,8 @@ "name" : "Arne Sommer" }, { - "id" : "Athanasius", "name" : "Athanasius", + "id" : "Athanasius", "data" : [ [ "Perl", @@ -57,8 +59,8 @@ ] }, { - "id" : "Cheok-Yin Fung", "name" : "Cheok-Yin Fung", + "id" : "Cheok-Yin Fung", "data" : [ [ "Perl", @@ -77,8 +79,8 @@ ] }, { - "id" : "E. Choroba", "name" : "E. Choroba", + "id" : "E. Choroba", "data" : [ [ "Perl", @@ -87,6 +89,7 @@ ] }, { + "id" : "Jaldhar H. Vyas", "data" : [ [ "Perl", @@ -101,12 +104,25 @@ 1 ] ], - "id" : "Jaldhar H. Vyas", "name" : "Jaldhar H. Vyas" }, { - "id" : "Laurent Rosenfeld", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Jorg Sommrey", + "name" : "Jorg Sommrey" + }, + { "name" : "Laurent Rosenfeld", + "id" : "Laurent Rosenfeld", "data" : [ [ "Perl", @@ -123,6 +139,8 @@ ] }, { + "name" : "Lubos Kolouch", + "id" : "Lubos Kolouch", "data" : [ [ "Perl", @@ -132,13 +150,9 @@ "Raku", 2 ] - ], - "name" : "Lubos Kolouch", - "id" : "Lubos Kolouch" + ] }, { - "id" : "Luca Ferrari", - "name" : "Luca Ferrari", "data" : [ [ "Raku", @@ -148,16 +162,18 @@ "Blog", 9 ] - ] + ], + "id" : "Luca Ferrari", + "name" : "Luca Ferrari" }, { + "id" : "Mariano Spadaccini", "data" : [ [ "Perl", 2 ] ], - "id" : "Mariano Spadaccini", "name" : "Mariano Spadaccini" }, { @@ -171,18 +187,17 @@ "name" : "Mark Anderson" }, { - "id" : "Matthew Neleigh", "name" : "Matthew Neleigh", "data" : [ [ "Perl", 2 ] - ] + ], + "id" : "Matthew Neleigh" }, { "name" : "Matthias Muth", - "id" : "Matthias Muth", "data" : [ [ "Perl", @@ -192,17 +207,36 @@ "Blog", 1 ] - ] + ], + "id" : "Matthias Muth" }, { + "name" : "Niels van Dijke", "data" : [ [ "Perl", 2 ] ], - "id" : "Niels van Dijke", - "name" : "Niels van Dijke" + "id" : "Niels van Dijke" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Packy Anderson", + "name" : "Packy Anderson" }, { "name" : "Peter Campbell Smith", @@ -220,17 +254,15 @@ }, { "id" : "Peter Meszaros", - "name" : "Peter Meszaros", "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "Peter Meszaros" }, { - "name" : "Robbie Hatley", - "id" : "Robbie Hatley", "data" : [ [ "Perl", @@ -240,9 +272,13 @@ "Blog", 1 ] - ] + ], + "id" : "Robbie Hatley", + "name" : "Robbie Hatley" }, { + "name" : "Roger Bell_West", + "id" : "Roger Bell_West", "data" : [ [ "Perl", @@ -252,12 +288,9 @@ "Raku", 2 ] - ], - "id" : "Roger Bell_West", - "name" : "Roger Bell_West" + ] }, { - "id" : "Stephen G. Lynn", "name" : "Stephen G. Lynn", "data" : [ [ @@ -268,11 +301,10 @@ "Blog", 1 ] - ] + ], + "id" : "Stephen G. Lynn" }, { - "name" : "Thomas Kohler", - "id" : "Thomas Kohler", "data" : [ [ "Perl", @@ -282,7 +314,9 @@ "Blog", 2 ] - ] + ], + "id" : "Thomas Kohler", + "name" : "Thomas Kohler" }, { "name" : "Ulrich Rieke", @@ -314,71 +348,81 @@ } ] }, + "title" : { + "text" : "The Weekly Challenge - 256" + }, "xAxis" : { "type" : "category" }, "series" : [ { + "name" : "The Weekly Challenge - 256", + "colorByPoint" : 1, "data" : [ { - "drilldown" : "Ali Moradi", "y" : 3, + "drilldown" : "Ali Moradi", "name" : "Ali Moradi" }, { - "drilldown" : "Andrew Shitov", "y" : 2, + "drilldown" : "Andrew Shitov", "name" : "Andrew Shitov" }, { - "drilldown" : "Arne Sommer", + "name" : "Arne Sommer", "y" : 3, - "name" : "Arne Sommer" + "drilldown" : "Arne Sommer" }, { + "name" : "Athanasius", "y" : 4, - "drilldown" : "Athanasius", - "name" : "Athanasius" + "drilldown" : "Athanasius" }, { - "name" : "Cheok-Yin Fung", + "y" : 2, "drilldown" : "Cheok-Yin Fung", - "y" : 2 + "name" : "Cheok-Yin Fung" }, { "name" : "David Ferrone", - "drilldown" : "David Ferrone", - "y" : 2 + "y" : 2, + "drilldown" : "David Ferrone" }, { - "name" : "E. Choroba", + "y" : 2, "drilldown" : "E. Choroba", - "y" : 2 + "name" : "E. Choroba" }, { - "y" : 5, "drilldown" : "Jaldhar H. Vyas", + "y" : 5, "name" : "Jaldhar H. Vyas" }, { - "name" : "Laurent Rosenfeld", + "drilldown" : "Jorg Sommrey", + "y" : 3, + "name" : "Jorg Sommrey" + }, + { + "drilldown" : "Laurent Rosenfeld", "y" : 6, - "drilldown" : "Laurent Rosenfeld" + "name" : "Laurent Rosenfeld" }, { + "name" : "Lubos Kolouch", "y" : 4, - "drilldown" : "Lubos Kolouch", - "name" : "Lubos Kolouch" + "drilldown" : "Lubos Kolouch" }, { - "name" : "Luca Ferrari", + "y" : 11, "drilldown" : "Luca Ferrari", - "y" : 11 + "name" : "Luca Ferrari" }, { - "name" : "Mariano Spadaccini", "drilldown" : "Mariano Spadaccini", - "y" : 2 + "y" : 2, + "name" : "Mariano Spadaccini" }, { "drilldown" : "Mark Anderson", @@ -386,9 +430,9 @@ "name" : "Mark Anderson" }, { + "name" : "Matthew Neleigh", "drilldown" : "Matthew Neleigh", - "y" : 2, - "name" : "Matthew Neleigh" + "y" : 2 }, { "y" : 3, @@ -396,11 +440,16 @@ "name" : "Matthias Muth" }, { - "y" : 2, "drilldown" : "Niels van Dijke", + "y" : 2, "name" : "Niels van Dijke" }, { + "name" : "Packy Anderson", + "y" : 5, + "drilldown" : "Packy Anderson" + }, + { "drilldown" : "Peter Campbell Smith", "y" : 3, "name" : "Peter Campbell Smith" @@ -411,66 +460,59 @@ "name" : "Peter Meszaros" }, { - "drilldown" : "Robbie Hatley", + "name" : "Robbie Hatley", "y" : 3, - "name" : "Robbie Hatley" + "drilldown" : "Robbie Hatley" }, { - "drilldown" : "Roger Bell_West", "y" : 4, + "drilldown" : "Roger Bell_West", "name" : "Roger Bell_West" }, { - "y" : 3, "drilldown" : "Stephen G. Lynn", + "y" : 3, "name" : "Stephen G. Lynn" }, { - "name" : "Thomas Kohler", "y" : 4, - "drilldown" : "Thomas Kohler" + "drilldown" : "Thomas Kohler", + "name" : "Thomas Kohler" }, { - "name" : "Ulrich Rieke", + "drilldown" : "Ulrich Rieke", "y" : 4, - "drilldown" : "Ulrich Rieke" + "name" : "Ulrich Rieke" }, { - "name" : "W. Luis Mochan", + "drilldown" : "W. Luis Mochan", "y" : 3, - "drilldown" : "W. Luis Mochan" + "name" : "W. Luis Mochan" } - ], - "colorByPoint" : 1, - "name" : "The Weekly Challenge - 256" + ] } ], - "legend" : { - "enabled" : 0 - }, - "title" : { - "text" : "The Weekly Challenge - 256" + "chart" : { + "type" : "column" }, "tooltip" : { - "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>", "followPointer" : 1, - "pointFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>" - }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } - }, - "chart" : { - "type" : "column" + "pointFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>", + "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>" }, "plotOptions" : { "series" : { - "borderWidth" : 0, "dataLabels" : { - "format" : "{point.y}", - "enabled" : 1 - } + "enabled" : 1, + "format" : "{point.y}" + }, + "borderWidth" : 0 } + }, + "subtitle" : { + "text" : "[Champions: 26] Last updated at 2024-02-16 20:18:44 GMT" + }, + "legend" : { + "enabled" : 0 } } diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index 80274e9f99..d9fa978ae3 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -1,63 +1,63 @@ { - "tooltip" : { - "pointFormat" : "<b>{point.y:.0f}</b>" - }, - "yAxis" : { - "min" : 0, - "title" : { - "text" : null - } + "legend" : { + "enabled" : "false" }, - "chart" : { - "type" : "column" + "subtitle" : { + "text" : "Last updated at 2024-02-16 20:18:44 GMT" }, "series" : [ { "name" : "Contributions", "dataLabels" : { - "format" : "{point.y:.0f}", + "rotation" : -90, "color" : "#FFFFFF", + "y" : 10, + "enabled" : "true", "align" : "right", "style" : { - "fontSize" : "13px", - "fontFamily" : "Verdana, sans-serif" + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" }, - "enabled" : "true", - "rotation" : -90, - "y" : 10 + "format" : "{point.y:.0f}" }, "data" : [ [ "Blog", - 4530 + 4532 ], [ "Perl", - 13230 + 13234 ], [ "Raku", - 7635 + 7637 ] ] } ], + "chart" : { + "type" : "column" + }, + "tooltip" : { + "pointFormat" : "<b>{point.y:.0f}</b>" + }, "xAxis" : { - "type" : "category", "labels" : { "style" : { "fontFamily" : "Verdana, sans-serif", "fontSize" : "13px" } - } - }, - "legend" : { - "enabled" : "false" + }, + "type" : "category" }, "title" : { "text" : "The Weekly Challenge Contributions [2019 - 2024]" }, - "subtitle" : { - "text" : "Last updated at 2024-02-15 19:27:48 GMT" + "yAxis" : { + "min" : 0, + "title" : { + "text" : null + } } } diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json index b8f37e09c6..f98eb287f2 100644 --- a/stats/pwc-language-breakdown.json +++ b/stats/pwc-language-breakdown.json @@ -1,38 +1,15 @@ { - "subtitle" : { - "text" : "Click the columns to drilldown the language breakdown. Last updated at 2024-02-15 19:27:48 GMT" - }, - "plotOptions" : { - "series" : { - "borderWidth" : 0, - "dataLabels" : { - "enabled" : 1, - "format" : "{point.y}" - } - } - }, - "tooltip" : { - "pointFormat" : "<span style=\"color:{point.color}\">Challenge {point.name}</span>: <b>{point.y:f}</b><br/>", - "followPointer" : "true", - "headerFormat" : "<span style=\"font-size:11px\"></span>" - }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } - }, - "chart" : { - "type" : "column" + "xAxis" : { + "type" : "category" }, "title" : { "text" : "The Weekly Challenge Language" }, - "legend" : { - "enabled" : "false" - }, "drilldown" : { "series" : [ { + "name" : "001", + "id" : "001", "data" : [ [ "Perl", @@ -46,11 +23,10 @@ "Blog", 12 ] - ], - "id" : "001", - "name" : "001" + ] }, { + "id" : "002", "data" : [ [ "Perl", @@ -65,10 +41,10 @@ 10 ] ], - "name" : "002", - "id" : "002" + "name" : "002" }, { + "name" : "003", "data" : [ [ "Perl", @@ -83,10 +59,10 @@ 9 ] ], - "id" : "003", - "name" : "003" + "id" : "003" }, { + "id" : "004", "data" : [ [ "Perl", @@ -101,10 +77,10 @@ 10 ] ], - "name" : "004", - "id" : "004" + "name" : "004" }, { + "id" : "005", "data" : [ [ "Perl", @@ -119,12 +95,9 @@ 12 ] ], - "id" : "005", "name" : "005" }, { - "id" : "006", - "name" : "006", "data" : [ [ "Perl", @@ -138,11 +111,11 @@ "Blog", 7 ] - ] + ], + "id" : "006", + "name" : "006" }, { - "id" : "007", - "name" : "007", "data" : [ [ "Perl", @@ -156,11 +129,11 @@ "Blog", 10 ] - ] + ], + "id" : "007", + "name" : "007" }, { - "name" : "008", - "id" : "008", "data" : [ [ "Perl", @@ -174,7 +147,9 @@ "Blog", 12 ] - ] + ], + "id" : "008", + "name" : "008" }, { "data" : [ @@ -191,10 +166,11 @@ 13 ] ], - "name" : "009", - "id" : "009" + "id" : "009", + "name" : "009" }, { + "name" : "010", "data" : [ [ "Perl", @@ -209,12 +185,9 @@ 11 ] ], - "id" : "010", - "name" : "010" + "id" : "010" }, { - "name" : "011", - "id" : "011", "data" : [ [ "Perl", @@ -228,11 +201,11 @@ "Blog", 10 ] - ] + ], + "id" : "011", + "name" : "011" }, { - "id" : "012", - "name" : "012", "data" : [ [ "Perl", @@ -246,9 +219,12 @@ "Blog", 11 ] - ] + ], + "id" : "012", + "name" : "012" }, { + "name" : "013", "data" : [ [ "Perl", @@ -263,10 +239,10 @@ 13 ] ], - "name" : "013", "id" : "013" }, { + "name" : "014", "data" : [ [ "Perl", @@ -281,10 +257,10 @@ 15 ] ], - "name" : "014", "id" : "014" }, { + "name" : "015", "data" : [ [ "Perl", @@ -299,8 +275,7 @@ 15 ] ], - "id" : "015", - "name" : "015" + "id" : "015" }, { "data" : [ @@ -321,7 +296,6 @@ "name" : "016" }, { - "id" : "017", "name" : "017", "data" : [ [ @@ -336,9 +310,11 @@ "Blog", 12 ] - ] + ], + "id" : "017" }, { + "id" : "018", "data" : [ [ "Perl", @@ -353,11 +329,9 @@ 14 ] ], - "id" : "018", "name" : "018" }, { - "name" : "019", "id" : "019", "data" : [ [ @@ -372,11 +346,12 @@ "Blog", 13 ] - ] + ], + "name" : "019" }, { - "id" : "020", "name" : "020", + "id" : "020", "data" : [ [ "Perl", @@ -407,10 +382,12 @@ 10 ] ], - "name" : "021", - "id" : "021" + "id" : "021", + "name" : "021" }, { + "name" : "022", + "id" : "022", "data" : [ [ "Perl", @@ -424,11 +401,10 @@ "Blog", 10 ] - ], - "name" : "022", - "id" : "022" + ] }, { + "name" : "023", "data" : [ [ "Perl", @@ -443,8 +419,7 @@ 12 ] ], - "id" : "023", - "name" : "023" + "id" : "023" }, { "name" : "024", @@ -483,6 +458,8 @@ "name" : "025" }, { + "name" : "026", + "id" : "026", "data" : [ [ "Perl", @@ -496,9 +473,7 @@ "Blog", 10 ] - ], - "name" : "026", - "id" : "026" + ] }, { "data" : [ @@ -519,7 +494,6 @@ "name" : "027" }, { - "name" : "028", "id" : "028", "data" : [ [ @@ -534,9 +508,11 @@ "Blog", 9 ] - ] + ], + "name" : "028" }, { + "name" : "029", "data" : [ [ "Perl", @@ -551,11 +527,9 @@ 12 ] ], - "name" : "029", "id" : "029" }, { - "name" : "030", "id" : "030", "data" : [ [ @@ -570,7 +544,8 @@ "Blog", 10 ] - ] + ], + "name" : "030" }, { "data" : [ @@ -591,7 +566,6 @@ "name" : "031" }, { - "id" : "032", "name" : "032", "data" : [ [ @@ -606,9 +580,11 @@ "Blog", 10 ] - ] + |
