diff options
| author | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2024-05-06 11:19:31 +0100 |
|---|---|---|
| committer | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2024-05-06 11:19:31 +0100 |
| commit | 479ca4e9c71aa2ea5be2bc7b66451c21be9d8dde (patch) | |
| tree | a833604c9880a15ef297b9f9378d333f7018160e | |
| parent | 2613c50fbf02be26a82bb14a464fa61d2afc23ac (diff) | |
| download | perlweeklychallenge-club-479ca4e9c71aa2ea5be2bc7b66451c21be9d8dde.tar.gz perlweeklychallenge-club-479ca4e9c71aa2ea5be2bc7b66451c21be9d8dde.tar.bz2 perlweeklychallenge-club-479ca4e9c71aa2ea5be2bc7b66451c21be9d8dde.zip | |
- Added solutions by Eric Cheung.
- Added solutions by Mark Anderson.
- Added solutions by Feng Chang.
- Added solutions by PokGoPun.
| -rwxr-xr-x | challenge-268/eric-cheung/python/ch-1.py | 25 | ||||
| -rwxr-xr-x | challenge-268/eric-cheung/python/ch-2.py | 15 | ||||
| -rw-r--r-- | stats/pwc-challenge-267.json | 612 | ||||
| -rw-r--r-- | stats/pwc-current.json | 594 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown-summary.json | 68 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown.json | 1919 | ||||
| -rw-r--r-- | stats/pwc-leaders.json | 408 | ||||
| -rw-r--r-- | stats/pwc-summary-1-30.json | 104 | ||||
| -rw-r--r-- | stats/pwc-summary-121-150.json | 38 | ||||
| -rw-r--r-- | stats/pwc-summary-151-180.json | 50 | ||||
| -rw-r--r-- | stats/pwc-summary-181-210.json | 50 | ||||
| -rw-r--r-- | stats/pwc-summary-211-240.json | 34 | ||||
| -rw-r--r-- | stats/pwc-summary-241-270.json | 44 | ||||
| -rw-r--r-- | stats/pwc-summary-271-300.json | 48 | ||||
| -rw-r--r-- | stats/pwc-summary-301-330.json | 36 | ||||
| -rw-r--r-- | stats/pwc-summary-31-60.json | 38 | ||||
| -rw-r--r-- | stats/pwc-summary-61-90.json | 114 | ||||
| -rw-r--r-- | stats/pwc-summary-91-120.json | 38 | ||||
| -rw-r--r-- | stats/pwc-summary.json | 664 |
19 files changed, 2520 insertions, 2379 deletions
diff --git a/challenge-268/eric-cheung/python/ch-1.py b/challenge-268/eric-cheung/python/ch-1.py new file mode 100755 index 0000000000..093fd3f45c --- /dev/null +++ b/challenge-268/eric-cheung/python/ch-1.py @@ -0,0 +1,25 @@ +
+## Example 1
+## arrX = [3, 7, 5]
+## arrY = [9, 5, 7]
+
+## Example 2
+## arrX = [1, 2, 1]
+## arrY = [5, 4, 4]
+
+## Example 3
+arrX = [2]
+arrY = [5]
+
+arrX = sorted(arrX)
+arrY = sorted(arrY)
+
+nDiff = arrY[0] - arrX[0]
+
+bIsSameDiff = True
+for nIndx in range(1, len(arrX)):
+ if arrY[nIndx] - arrX[nIndx] != nDiff:
+ bIsSameDiff = False
+ break
+
+print (nDiff if bIsSameDiff else "")
diff --git a/challenge-268/eric-cheung/python/ch-2.py b/challenge-268/eric-cheung/python/ch-2.py new file mode 100755 index 0000000000..de091f76fe --- /dev/null +++ b/challenge-268/eric-cheung/python/ch-2.py @@ -0,0 +1,15 @@ +
+## arrInt = [2, 5, 3, 4] ## Example 1
+## arrInt = [9, 4, 1, 3, 6, 4, 6, 1] ## Example 2
+arrInt = [1, 2, 2, 3] ## Example 3
+
+arrInt = sorted(arrInt)
+arrOutput = []
+
+while len(arrInt) > 0:
+ arrOutput.append(arrInt[1])
+ arrOutput.append(arrInt[0])
+ del arrInt[1]
+ del arrInt[0]
+
+print (arrOutput)
diff --git a/stats/pwc-challenge-267.json b/stats/pwc-challenge-267.json new file mode 100644 index 0000000000..1202c517ae --- /dev/null +++ b/stats/pwc-challenge-267.json @@ -0,0 +1,612 @@ +{ + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + } + } + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "drilldown" : { + "series" : [ + { + "id" : "Adam Russell", + "name" : "Adam Russell", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "name" : "Arne Sommer", + "id" : "Arne Sommer", + "data" : [ + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ], + "id" : "Athanasius", + "name" : "Athanasius" + }, + { + "id" : "BarrOff", + "name" : "BarrOff", + "data" : [ + [ + "Perl", + 1 + ], + [ + "Raku", + 1 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Bob Lied", + "name" : "Bob Lied" + }, + { + "id" : "Bruce Gray", + "name" : "Bruce Gray", + "data" : [ + [ + "Raku", + 2 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Dave Jacoby", + "id" : "Dave Jacoby" + }, + { + "name" : "David Ferrone", + "id" : "David Ferrone", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "id" : "E. Choroba", + "name" : "E. Choroba", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "name" : "Feng Chang", + "id" : "Feng Chang", + "data" : [ + [ + "Raku", + 2 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Jaldhar H. Vyas", + "name" : "Jaldhar H. Vyas" + }, + { + "id" : "Jan Krnavek", + "name" : "Jan Krnavek", + "data" : [ + [ + "Raku", + 2 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Jorg Sommrey", + "name" : "Jorg Sommrey" + }, + { + "id" : "Lance Wicks", + "name" : "Lance Wicks", + "data" : [ + [ + "Perl", + 1 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 2 + ] + ], + "name" : "Laurent Rosenfeld", + "id" : "Laurent Rosenfeld" + }, + { + "name" : "Luca Ferrari", + "id" : "Luca Ferrari", + "data" : [ + [ + "Raku", + 2 + ], + [ + "Blog", + 9 + ] + ] + }, + { + "name" : "Mark Anderson", + "id" : "Mark Anderson", + "data" : [ + [ + "Raku", + 2 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Matthew Neleigh", + "id" : "Matthew Neleigh" + }, + { + "id" : "Matthias Muth", + "name" : "Matthias Muth", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Nelo Tovar", + "name" : "Nelo Tovar" + }, + { + "id" : "Packy Anderson", + "name" : "Packy Anderson", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "id" : "Peter Campbell Smith", + "name" : "Peter Campbell Smith", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "id" : "Peter Meszaros", + "name" : "Peter Meszaros", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "name" : "Princy Mangla", + "id" : "Princy Mangla", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Reinier Maliepaard", + "id" : "Reinier Maliepaard" + }, + { + "name" : "Robbie Hatley", + "id" : "Robbie Hatley", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "id" : "Robert Ransbottom", + "name" : "Robert Ransbottom", + "data" : [ + [ + "Raku", + 2 + ] + ] + }, + { + "id" : "Roger Bell_West", + "name" : "Roger Bell_West", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 2 + ] + ], + "id" : "Thomas Kohler", + "name" : "Thomas Kohler" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ], + "name" : "Ulrich Rieke", + "id" : "Ulrich Rieke" + }, + { + "name" : "W. Luis Mochan", + "id" : "W. Luis Mochan", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Wanderdoc", + "id" : "Wanderdoc" + } + ] + }, + "series" : [ + { + "data" : [ + { + "name" : "Adam Russell", + "drilldown" : "Adam Russell", + "y" : 2 + }, + { + "name" : "Arne Sommer", + "drilldown" : "Arne Sommer", + "y" : 3 + }, + { + "drilldown" : "Athanasius", + "name" : "Athanasius", + "y" : 4 + }, + { + "drilldown" : "BarrOff", + "name" : "BarrOff", + "y" : 2 + }, + { + "y" : 3, + "name" : "Bob Lied", + "drilldown" : "Bob Lied" + }, + { + "name" : "Bruce Gray", + "drilldown" : "Bruce Gray", + "y" : 2 + }, + { + "y" : 2, + "drilldown" : "Dave Jacoby", + "name" : "Dave Jacoby" + }, + { + "drilldown" : "David Ferrone", + "name" : "David Ferrone", + "y" : 2 + }, + { + "drilldown" : "E. Choroba", + "name" : "E. Choroba", + "y" : 2 + }, + { + "y" : 2, + "name" : "Feng Chang", + "drilldown" : "Feng Chang" + }, + { + "name" : "Jaldhar H. Vyas", + "drilldown" : "Jaldhar H. Vyas", + "y" : 5 + }, + { + "y" : 2, + "drilldown" : "Jan Krnavek", + "name" : "Jan Krnavek" + }, + { + "name" : "Jorg Sommrey", + "drilldown" : "Jorg Sommrey", + "y" : 3 + }, + { + "y" : 1, + "drilldown" : "Lance Wicks", + "name" : "Lance Wicks" + }, + { + "y" : 6, + "drilldown" : "Laurent Rosenfeld", + "name" : "Laurent Rosenfeld" + }, + { + "y" : 11, + "name" : "Luca Ferrari", + "drilldown" : "Luca Ferrari" + }, + { + "y" : 2, + "drilldown" : "Mark Anderson", + "name" : "Mark Anderson" + }, + { + "drilldown" : "Matthew Neleigh", + "name" : "Matthew Neleigh", + "y" : 2 + }, + { + "name" : "Matthias Muth", + "drilldown" : "Matthias Muth", + "y" : 3 + }, + { + "y" : 2, + "name" : "Nelo Tovar", + "drilldown" : "Nelo Tovar" + }, + { + "name" : "Packy Anderson", + "drilldown" : "Packy Anderson", + "y" : 5 + }, + { + "y" : 3, + "name" : "Peter Campbell Smith", + "drilldown" : "Peter Campbell Smith" + }, + { + "y" : 2, + "name" : "Peter Meszaros", + "drilldown" : "Peter Meszaros" + }, + { + "y" : 2, + "name" : "Princy Mangla", + "drilldown" : "Princy Mangla" + }, + { + "drilldown" : "Reinier Maliepaard", + "name" : "Reinier Maliepaard", + "y" : 3 + }, + { + "drilldown" : "Robbie Hatley", + "name" : "Robbie Hatley", + "y" : 3 + }, + { + "name" : "Robert Ransbottom", + "drilldown" : "Robert Ransbottom", + "y" : 2 + }, + { + "drilldown" : "Roger Bell_West", + "name" : "Roger Bell_West", + "y" : 5 + }, + { + "name" : "Thomas Kohler", + "drilldown" : "Thomas Kohler", + "y" : 4 + }, + { + "y" : 4, + "drilldown" : "Ulrich Rieke", + "name" : "Ulrich Rieke" + }, + { + "y" : 3, + "name" : "W. Luis Mochan", + "drilldown" : "W. Luis Mochan" + }, + { + "drilldown" : "Wanderdoc", + "name" : "Wanderdoc", + "y" : 2 + } + ], + "name" : "The Weekly Challenge - 267", + "colorByPoint" : 1 + } + ], + "legend" : { + "enabled" : 0 + }, + "subtitle" : { + "text" : "[Champions: 32] Last updated at 2024-05-06 10:12:17 GMT" + }, + "xAxis" : { + "type" : "category" + }, + "title" : { + "text" : "The Weekly Challenge - 267" + }, + "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/>" + } +} diff --git a/stats/pwc-current.json b/stats/pwc-current.json index bd1fa2a3b0..5b9375cfbb 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,303 +1,46 @@ { + "title" : { + "text" : "The Weekly Challenge - 268" + }, "series" : [ { + "colorByPoint" : 1, "data" : [ { - "name" : "Adam Russell", - "y" : 2, - "drilldown" : "Adam Russell" - }, - { - "name" : "Arne Sommer", - "y" : 3, - "drilldown" : "Arne Sommer" - }, - { - "drilldown" : "Athanasius", - "y" : 4, - "name" : "Athanasius" - }, - { "y" : 2, - "drilldown" : "BarrOff", - "name" : "BarrOff" - }, - { - "y" : 3, - "drilldown" : "Bob Lied", - "name" : "Bob Lied" - }, - { - "y" : 2, - "drilldown" : "Bruce Gray", - "name" : "Bruce Gray" - }, - { - "y" : 2, - "drilldown" : "Dave Jacoby", - "name" : "Dave Jacoby" - }, - { - "name" : "David Ferrone", - "y" : 2, - "drilldown" : "David Ferrone" - }, - { - "name" : "E. Choroba", - "drilldown" : "E. Choroba", - "y" : 2 - }, - { - "y" : 2, - "drilldown" : "Feng Chang", - "name" : "Feng Chang" - }, - { - "name" : "Jaldhar H. Vyas", - "y" : 5, - "drilldown" : "Jaldhar H. Vyas" - }, - { - "y" : 2, - "drilldown" : "Jan Krnavek", - "name" : "Jan Krnavek" - }, - { - "name" : "Jorg Sommrey", - "y" : 3, - "drilldown" : "Jorg Sommrey" - }, - { - "name" : "Lance Wicks", - "drilldown" : "Lance Wicks", - "y" : 1 - }, - { - "drilldown" : "Laurent Rosenfeld", - "y" : 6, - "name" : "Laurent Rosenfeld" - }, - { - "name" : "Luca Ferrari", - "drilldown" : "Luca Ferrari", - "y" : 11 - }, - { - "name" : "Mark Anderson", - "y" : 2, - "drilldown" : "Mark Anderson" - }, - { - "name" : "Matthew Neleigh", - "drilldown" : "Matthew Neleigh", - "y" : 2 - }, - { - "y" : 3, - "drilldown" : "Matthias Muth", - "name" : "Matthias Muth" + "name" : "Feng Chang", + "drilldown" : "Feng Chang" }, { - "drilldown" : "Nelo Tovar", + "drilldown" : "Mark Anderson", "y" : 2, - "name" : "Nelo Tovar" - }, - { - "y" : 5, - "drilldown" : "Packy Anderson", - "name" : "Packy Anderson" - }, - { - "y" : 3, - "drilldown" : "Peter Campbell Smith", - "name" : "Peter Campbell Smith" - }, - { - "name" : "Peter Meszaros", - "drilldown" : "Peter Meszaros", - "y" : 2 - }, - { - "name" : "Princy Mangla", - "drilldown" : "Princy Mangla", - "y" : 2 - }, - { - "name" : "Reinier Maliepaard", - "y" : 3, - "drilldown" : "Reinier Maliepaard" - }, - { - "name" : "Robbie Hatley", - "y" : 3, - "drilldown" : "Robbie Hatley" - }, - { - "name" : "Robert Ransbottom", - "drilldown" : "Robert Ransbottom", - "y" : 2 - }, - { - "drilldown" : "Roger Bell_West", - "y" : 5, - "name" : "Roger Bell_West" - }, - { - "drilldown" : "Thomas Kohler", - "y" : 4, - "name" : "Thomas Kohler" - }, - { - "name" : "Ulrich Rieke", - "drilldown" : "Ulrich Rieke", - "y" : 4 - }, - { - "y" : 3, - "drilldown" : "W. Luis Mochan", - "name" : "W. Luis Mochan" - }, - { - "name" : "Wanderdoc", - "y" : 2, - "drilldown" : "Wanderdoc" + "name" : "Mark Anderson" } ], - "name" : "The Weekly Challenge - 267", - "colorByPoint" : 1 + "name" : "The Weekly Challenge - 268" } ], - "legend" : { - "enabled" : 0 - }, - "subtitle" : { - "text" : "[Champions: 32] Last updated at 2024-05-05 20:46:46 GMT" + "xAxis" : { + "type" : "category" }, "yAxis" : { "title" : { "text" : "Total Solutions" } }, - "plotOptions" : { - "series" : { - "borderWidth" : 0, - "dataLabels" : { - "enabled" : 1, - "format" : "{point.y}" - } - } + "legend" : { + "enabled" : 0 + }, + "tooltip" : { + "followPointer" : 1, + "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/>" }, "drilldown" : { "series" : [ { - "name" : "Adam Russell", - "id" : "Adam Russell", - "data" : [ - [ - "Perl", - 2 - ] - ] - }, - { - "data" : [ - [ - "Raku", - 2 - ], - [ - "Blog", - 1 - ] - ], - "id" : "Arne Sommer", - "name" : "Arne Sommer" - }, - { - "id" : "Athanasius", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ] - ], - "name" : "Athanasius" - }, - { - "data" : [ - [ - "Perl", - 1 - ], - [ - "Raku", - 1 - ] - ], - "id" : "BarrOff", - "name" : "BarrOff" - }, - { - "id" : "Bob Lied", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", - 1 - ] - ], - "name" : "Bob Lied" - }, - { - "id" : "Bruce Gray", - "data" : [ - [ - "Raku", - 2 - ] - ], - "name" : "Bruce Gray" - }, - { - "data" : [ - [ - "Perl", - 2 - ] - ], - "id" : "Dave Jacoby", - "name" : "Dave Jacoby" - }, - { - "data" : [ - [ - "Perl", - 2 - ] - ], - "id" : "David Ferrone", - "name" : "David Ferrone" - }, - { - "name" : "E. Choroba", - "id" : "E. Choroba", - "data" : [ - [ - "Perl", - 2 - ] - ] - }, - { - "name" : "Feng Chang", "id" : "Feng Chang", + "name" : "Feng Chang", "data" : [ [ "Raku", @@ -308,305 +51,28 @@ { "data" : [ [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ], - [ - "Blog", - 1 - ] - ], - "id" : "Jaldhar H. Vyas", - "name" : "Jaldhar H. Vyas" - }, - { - "id" : "Jan Krnavek", - "data" : [ - [ - "Raku", - 2 - ] - ], - "name" : "Jan Krnavek" - }, - { - "name" : "Jorg Sommrey", - "id" : "Jorg Sommrey", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", - 1 - ] - ] - }, - { - "name" : "Lance Wicks", - "data" : [ - [ - "Perl", - 1 - ] - ], - "id" : "Lance Wicks" - }, - { - "name" : "Laurent Rosenfeld", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ], - [ - "Blog", - 2 - ] - ], - "id" : "Laurent Rosenfeld" - }, - { - "data" : [ - [ "Raku", 2 - ], - [ - "Blog", - 9 ] ], - "id" : "Luca Ferrari", - |
