aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad S Anwar <mohammad.anwar@yahoo.com>2023-12-18 13:24:11 +0000
committerMohammad S Anwar <mohammad.anwar@yahoo.com>2023-12-18 13:24:11 +0000
commite2a7867e1ab365b7bc2787f0d650c56e789a74d3 (patch)
treeca2f4b2387ab212d7ca1a848014668f25e8a4ee3
parent66b0a0e7f70f88b7fbbea2c73b3f1598369331a6 (diff)
downloadperlweeklychallenge-club-e2a7867e1ab365b7bc2787f0d650c56e789a74d3.tar.gz
perlweeklychallenge-club-e2a7867e1ab365b7bc2787f0d650c56e789a74d3.tar.bz2
perlweeklychallenge-club-e2a7867e1ab365b7bc2787f0d650c56e789a74d3.zip
- Added solutions by Bob Lied.
- Added solutions by David Ferrone. - Added solutions by W. Luis Mochan. - Added solutions by Mark Anderson. - Added solutions by Niels van Dijke.
-rwxr-xr-xchallenge-248/eric-cheung/python/ch-1.py21
-rwxr-xr-xchallenge-248/eric-cheung/python/ch-2.py13
-rwxr-xr-xchallenge-248/perlboy1967/perl/ch-1.pl (renamed from challenge-248/perlboy1967/perl/ch1.pl)0
-rwxr-xr-xchallenge-248/perlboy1967/perl/ch-2.pl (renamed from challenge-248/perlboy1967/perl/ch2.pl)0
-rw-r--r--stats/pwc-challenge-247.json499
-rw-r--r--stats/pwc-current.json496
-rw-r--r--stats/pwc-language-breakdown-summary.json72
-rw-r--r--stats/pwc-language-breakdown.json3261
-rw-r--r--stats/pwc-leaders.json716
-rw-r--r--stats/pwc-summary-1-30.json36
-rw-r--r--stats/pwc-summary-121-150.json106
-rw-r--r--stats/pwc-summary-151-180.json60
-rw-r--r--stats/pwc-summary-181-210.json40
-rw-r--r--stats/pwc-summary-211-240.json42
-rw-r--r--stats/pwc-summary-241-270.json110
-rw-r--r--stats/pwc-summary-271-300.json52
-rw-r--r--stats/pwc-summary-301-330.json48
-rw-r--r--stats/pwc-summary-31-60.json56
-rw-r--r--stats/pwc-summary-61-90.json94
-rw-r--r--stats/pwc-summary-91-120.json42
-rw-r--r--stats/pwc-summary.json664
21 files changed, 3306 insertions, 3122 deletions
diff --git a/challenge-248/eric-cheung/python/ch-1.py b/challenge-248/eric-cheung/python/ch-1.py
new file mode 100755
index 0000000000..6a7dab3628
--- /dev/null
+++ b/challenge-248/eric-cheung/python/ch-1.py
@@ -0,0 +1,21 @@
+
+## Example 1
+## strInput = "loveleetcode"
+## strChar = "e"
+
+## Example 2
+strInput = "aaab"
+strChar = "b"
+
+arrCharIndx = [nIndx for nIndx in range(len(strInput)) if strInput[nIndx] == strChar]
+arrOutput = []
+
+for nIndx in range(len(strInput)):
+ if strInput[nIndx] == strChar:
+ arrOutput.append(0)
+ elif nIndx < arrCharIndx[0]:
+ arrOutput.append(arrCharIndx[0] - nIndx)
+ else:
+ arrOutput.append(min([abs(nLoop - nIndx) for nLoop in arrCharIndx]))
+
+print (arrOutput)
diff --git a/challenge-248/eric-cheung/python/ch-2.py b/challenge-248/eric-cheung/python/ch-2.py
new file mode 100755
index 0000000000..61e8e84fd1
--- /dev/null
+++ b/challenge-248/eric-cheung/python/ch-2.py
@@ -0,0 +1,13 @@
+
+## arrMatrixInput = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]] ## Example 1
+arrMatrixInput = [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]] ## Example 2
+
+arrMatrixOutput = []
+
+for nRow in range(len(arrMatrixInput) - 1):
+ arrRow = []
+ for nCol in range(len(arrMatrixInput[nRow]) - 1):
+ arrRow.append(arrMatrixInput[nRow][nCol] + arrMatrixInput[nRow][nCol + 1] + arrMatrixInput[nRow + 1][nCol] + arrMatrixInput[nRow + 1][nCol + 1])
+ arrMatrixOutput.append(arrRow)
+
+print (arrMatrixOutput)
diff --git a/challenge-248/perlboy1967/perl/ch1.pl b/challenge-248/perlboy1967/perl/ch-1.pl
index f8936a8df4..f8936a8df4 100755
--- a/challenge-248/perlboy1967/perl/ch1.pl
+++ b/challenge-248/perlboy1967/perl/ch-1.pl
diff --git a/challenge-248/perlboy1967/perl/ch2.pl b/challenge-248/perlboy1967/perl/ch-2.pl
index 3e7dfe51cd..3e7dfe51cd 100755
--- a/challenge-248/perlboy1967/perl/ch2.pl
+++ b/challenge-248/perlboy1967/perl/ch-2.pl
diff --git a/stats/pwc-challenge-247.json b/stats/pwc-challenge-247.json
new file mode 100644
index 0000000000..aedb2cfcef
--- /dev/null
+++ b/stats/pwc-challenge-247.json
@@ -0,0 +1,499 @@
+{
+ "yAxis" : {
+ "title" : {
+ "text" : "Total Solutions"
+ }
+ },
+ "xAxis" : {
+ "type" : "category"
+ },
+ "plotOptions" : {
+ "series" : {
+ "dataLabels" : {
+ "format" : "{point.y}",
+ "enabled" : 1
+ },
+ "borderWidth" : 0
+ }
+ },
+ "title" : {
+ "text" : "The Weekly Challenge - 247"
+ },
+ "series" : [
+ {
+ "data" : [
+ {
+ "name" : "Arne Sommer",
+ "drilldown" : "Arne Sommer",
+ "y" : 3
+ },
+ {
+ "y" : 2,
+ "drilldown" : "Athanasius",
+ "name" : "Athanasius"
+ },
+ {
+ "name" : "BarrOff",
+ "drilldown" : "BarrOff",
+ "y" : 2
+ },
+ {
+ "y" : 2,
+ "name" : "Bob Lied",
+ "drilldown" : "Bob Lied"
+ },
+ {
+ "y" : 2,
+ "drilldown" : "Bruce Gray",
+ "name" : "Bruce Gray"
+ },
+ {
+ "y" : 1,
+ "drilldown" : "Cheok-Yin Fung",
+ "name" : "Cheok-Yin Fung"
+ },
+ {
+ "name" : "David Ferrone",
+ "drilldown" : "David Ferrone",
+ "y" : 2
+ },
+ {
+ "name" : "E. Choroba",
+ "drilldown" : "E. Choroba",
+ "y" : 2
+ },
+ {
+ "y" : 3,
+ "drilldown" : "Jorg Sommrey",
+ "name" : "Jorg Sommrey"
+ },
+ {
+ "y" : 3,
+ "name" : "Laurent Rosenfeld",
+ "drilldown" : "Laurent Rosenfeld"
+ },
+ {
+ "drilldown" : "Lubos Kolouch",
+ "name" : "Lubos Kolouch",
+ "y" : 5
+ },
+ {
+ "y" : 10,
+ "drilldown" : "Luca Ferrari",
+ "name" : "Luca Ferrari"
+ },
+ {
+ "drilldown" : "Mark Anderson",
+ "name" : "Mark Anderson",
+ "y" : 2
+ },
+ {
+ "name" : "Matthew Neleigh",
+ "drilldown" : "Matthew Neleigh",
+ "y" : 2
+ },
+ {
+ "drilldown" : "Nelo Tovar",
+ "name" : "Nelo Tovar",
+ "y" : 2
+ },
+ {
+ "y" : 2,
+ "name" : "Niels van Dijke",
+ "drilldown" : "Niels van Dijke"
+ },
+ {
+ "name" : "Packy Anderson",
+ "drilldown" : "Packy Anderson",
+ "y" : 5
+ },
+ {
+ "drilldown" : "Peter Campbell Smith",
+ "name" : "Peter Campbell Smith",
+ "y" : 3
+ },
+ {
+ "y" : 2,
+ "drilldown" : "Peter Meszaros",
+ "name" : "Peter Meszaros"
+ },
+ {
+ "y" : 5,
+ "drilldown" : "Roger Bell_West",
+ "name" : "Roger Bell_West"
+ },
+ {
+ "y" : 3,
+ "name" : "Simon Green",
+ "drilldown" : "Simon Green"
+ },
+ {
+ "y" : 3,
+ "name" : "Stephen G. Lynn",
+ "drilldown" : "Stephen G. Lynn"
+ },
+ {
+ "y" : 4,
+ "name" : "Thomas Kohler",
+ "drilldown" : "Thomas Kohler"
+ },
+ {
+ "y" : 4,
+ "drilldown" : "Ulrich Rieke",
+ "name" : "Ulrich Rieke"
+ },
+ {
+ "drilldown" : "W. Luis Mochan",
+ "name" : "W. Luis Mochan",
+ "y" : 3
+ }
+ ],
+ "colorByPoint" : 1,
+ "name" : "The Weekly Challenge - 247"
+ }
+ ],
+ "drilldown" : {
+ "series" : [
+ {
+ "name" : "Arne Sommer",
+ "id" : "Arne Sommer",
+ "data" : [
+ [
+ "Raku",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ]
+ },
+ {
+ "id" : "Athanasius",
+ "name" : "Athanasius",
+ "data" : [
+ [
+ "Perl",
+ 1
+ ],
+ [
+ "Raku",
+ 1
+ ]
+ ]
+ },
+ {
+ "id" : "BarrOff",
+ "name" : "BarrOff",
+ "data" : [
+ [
+ "Perl",
+ 1
+ ],
+ [
+ "Raku",
+ 1
+ ]
+ ]
+ },
+ {
+ "id" : "Bob Lied",
+ "name" : "Bob Lied",
+ "data" : [
+ [
+ "Perl",
+ 2
+ ]
+ ]
+ },
+ {
+ "id" : "Bruce Gray",
+ "name" : "Bruce Gray",
+ "data" : [
+ [
+ "Raku",
+ 2
+ ]
+ ]
+ },
+ {
+ "name" : "Cheok-Yin Fung",
+ "id" : "Cheok-Yin Fung",
+ "data" : [
+ [
+ "Perl",
+ 1
+ ]
+ ]
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ]
+ ],
+ "name" : "David Ferrone",
+ "id" : "David Ferrone"
+ },
+ {
+ "name" : "E. Choroba",
+ "id" : "E. Choroba",
+ "data" : [
+ [
+ "Perl",
+ 2
+ ]
+ ]
+ },
+ {
+ "id" : "Jorg Sommrey",
+ "name" : "Jorg Sommrey",
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ]
+ },
+ {
+ "id" : "Laurent Rosenfeld",
+ "name" : "Laurent Rosenfeld",
+ "data" : [
+ [
+ "Perl",
+ 1
+ ],
+ [
+ "Raku",
+ 1
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ]
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Raku",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ],
+ "id" : "Lubos Kolouch",
+ "name" : "Lubos Kolouch"
+ },
+ {
+ "id" : "Luca Ferrari",
+ "name" : "Luca Ferrari",
+ "data" : [
+ [
+ "Raku",
+ 2
+ ],
+ [
+ "Blog",
+ 8
+ ]
+ ]
+ },
+ {
+ "data" : [
+ [
+ "Raku",
+ 2
+ ]
+ ],
+ "id" : "Mark Anderson",
+ "name" : "Mark Anderson"
+ },
+ {
+ "name" : "Matthew Neleigh",
+ "id" : "Matthew Neleigh",
+ "data" : [
+ [
+ "Perl",
+ 2
+ ]
+ ]
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ]
+ ],
+ "name" : "Nelo Tovar",
+ "id" : "Nelo Tovar"
+ },
+ {
+ "name" : "Niels van Dijke",
+ "id" : "Niels van Dijke",
+ "data" : [
+ [
+ "Perl",
+ 2
+ ]
+ ]
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Raku",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ],
+ "name" : "Packy Anderson",
+ "id" : "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
+ ],
+ [
+ "Raku",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ],
+ "id" : "Roger Bell_West",
+ "name" : "Roger Bell_West"
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ],
+ "name" : "Simon Green",
+ "id" : "Simon Green"
+ },
+ {
+ "name" : "Stephen G. Lynn",
+ "id" : "Stephen G. Lynn",
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ]
+ },
+ {
+ "name" : "Thomas Kohler",
+ "id" : "Thomas Kohler",
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Blog",
+ 2
+ ]
+ ]
+ },
+ {
+ "id" : "Ulrich Rieke",
+ "name" : "Ulrich Rieke",
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Raku",
+ 2
+ ]
+ ]
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ],
+ "id" : "W. Luis Mochan",
+ "name" : "W. Luis Mochan"
+ }
+ ]
+ },
+ "chart" : {
+ "type" : "column"
+ },
+ "legend" : {
+ "enabled" : 0
+ },
+ "subtitle" : {
+ "text" : "[Champions: 25] Last updated at 2023-12-18 13:16:20 GMT"
+ },
+ "tooltip" : {
+ "followPointer" : 1,
+ "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>",
+ "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 4f0b80d965..fbc5620f5e 100644
--- a/stats/pwc-current.json
+++ b/stats/pwc-current.json
@@ -1,227 +1,20 @@
{
- "legend" : {
- "enabled" : 0
- },
- "subtitle" : {
- "text" : "[Champions: 25] Last updated at 2023-12-17 21:18:08 GMT"
- },
- "series" : [
- {
- "name" : "The Weekly Challenge - 247",
- "colorByPoint" : 1,
- "data" : [
- {
- "name" : "Arne Sommer",
- "y" : 3,
- "drilldown" : "Arne Sommer"
- },
- {
- "drilldown" : "Athanasius",
- "name" : "Athanasius",
- "y" : 2
- },
- {
- "name" : "BarrOff",
- "y" : 2,
- "drilldown" : "BarrOff"
- },
- {
- "drilldown" : "Bob Lied",
- "name" : "Bob Lied",
- "y" : 2
- },
- {
- "name" : "Bruce Gray",
- "y" : 2,
- "drilldown" : "Bruce Gray"
- },
- {
- "y" : 1,
- "name" : "Cheok-Yin Fung",
- "drilldown" : "Cheok-Yin Fung"
- },
- {
- "drilldown" : "David Ferrone",
- "y" : 2,
- "name" : "David Ferrone"
- },
- {
- "name" : "E. Choroba",
- "y" : 2,
- "drilldown" : "E. Choroba"
- },
- {
- "name" : "Jorg Sommrey",
- "y" : 3,
- "drilldown" : "Jorg Sommrey"
- },
- {
- "y" : 3,
- "name" : "Laurent Rosenfeld",
- "drilldown" : "Laurent Rosenfeld"
- },
- {
- "drilldown" : "Lubos Kolouch",
- "y" : 5,
- "name" : "Lubos Kolouch"
- },
- {
- "y" : 10,
- "name" : "Luca Ferrari",
- "drilldown" : "Luca Ferrari"
- },
- {
- "drilldown" : "Mark Anderson",
- "name" : "Mark Anderson",
- "y" : 2
- },
- {
- "drilldown" : "Matthew Neleigh",
- "y" : 2,
- "name" : "Matthew Neleigh"
- },
- {
- "y" : 2,
- "name" : "Nelo Tovar",
- "drilldown" : "Nelo Tovar"
- },
- {
- "name" : "Niels van Dijke",
- "y" : 2,
- "drilldown" : "Niels van Dijke"
- },
- {
- "y" : 5,
- "name" : "Packy Anderson",
- "drilldown" : "Packy Anderson"
- },
- {
- "name" : "Peter Campbell Smith",
- "y" : 3,
- "drilldown" : "Peter Campbell Smith"
- },
- {
- "name" : "Peter Meszaros",
- "y" : 2,
- "drilldown" : "Peter Meszaros"
- },
- {
- "name" : "Roger Bell_West",
- "y" : 5,
- "drilldown" : "Roger Bell_West"
- },
- {
- "drilldown" : "Simon Green",
- "y" : 3,
- "name" : "Simon Green"
- },
- {
- "name" : "Stephen G. Lynn",
- "y" : 3,
- "drilldown" : "Stephen G. Lynn"
- },
- {
- "drilldown" : "Thomas Kohler",
- "name" : "Thomas Kohler",
- "y" : 4
- },
- {
- "y" : 4,
- "name" : "Ulrich Rieke",
- "drilldown" : "Ulrich Rieke"
- },
- {
- "drilldown" : "W. Luis Mochan",
- "name" : "W. Luis Mochan",
- "y" : 3
- }
- ]
- }
- ],
- "plotOptions" : {
- "series" : {
- "dataLabels" : {
- "format" : "{point.y}",
- "enabled" : 1
- },
- "borderWidth" : 0
- }
+ "xAxis" : {
+ "type" : "category"
},
"drilldown" : {
"series" : [
{
- "name" : "Arne Sommer",
- "id" : "Arne Sommer",
- "data" : [
- [
- "Raku",
- 2
- ],
- [
- "Blog",
- 1
- ]
- ]
- },
- {
- "data" : [
- [
- "Perl",
- 1
- ],
- [
- "Raku",
- 1
- ]
- ],
- "id" : "Athanasius",
- "name" : "Athanasius"
- },
- {
- "name" : "BarrOff",
- "id" : "BarrOff",
- "data" : [
- [
- "Perl",
- 1
- ],
- [
- "Raku",
- 1
- ]
- ]
- },
- {
+ "id" : "Bob Lied",
"data" : [
[
"Perl",
2
]
],
- "id" : "Bob Lied",
"name" : "Bob Lied"
},
{
- "name" : "Bruce Gray",
- "data" : [
- [
- "Raku",
- 2
- ]
- ],
- "id" : "Bruce Gray"
- },
- {
- "data" : [
- [
- "Perl",
- 1
- ]
- ],
- "id" : "Cheok-Yin Fung",
- "name" : "Cheok-Yin Fung"
- },
- {
"name" : "David Ferrone",
"data" : [
[
@@ -232,238 +25,27 @@
"id" : "David Ferrone"
},
{
- "name" : "E. Choroba",
- "data" : [
- [
- "Perl",
- 2
- ]
- ],
- "id" : "E. Choroba"
- },
- {
- "name" : "Jorg Sommrey",
- "id" : "Jorg Sommrey",
- "data" : [
- [
- "Perl",
- 2
- ],
- [
- "Blog",
- 1
- ]
- ]
- },
- {
- "name" : "Laurent Rosenfeld",
- "data" : [
- [
- "Perl",
- 1
- ],
- [
- "Raku",
- 1
- ],
- [
- "Blog",
- 1
- ]
- ],
- "id" : "Laurent Rosenfeld"
- },
- {
- "name" : "Lubos Kolouch",
- "id" : "Lubos Kolouch",
+ "name" : "Mark Anderson",
"data" : [
[
- "Perl",
- 2
- ],
- [
"Raku",
2
- ],
- [
- "Blog",
- 1
- ]
- ]
- },
- {
- "id" : "Luca Ferrari",
- "data" : [
- [
- "Raku",
- 2
- ],
- [
- "Blog",
- 8
- ]
- ],
- "name" : "Luca Ferrari"
- },
- {
- "id" : "Mark Anderson",
- "data" : [
- [
- "Raku",
- 2
- ]
- ],
- "name" : "Mark Anderson"
- },
- {
- "name" : "Matthew Neleigh",
- "data" : [
- [
- "Perl",
- 2
- ]
- ],
- "id" : "Matthew Neleigh"
- },
- {
- "id" : "Nelo Tovar",
- "data" : [
- [
- "Perl",
- 2
]
],
- "name" : "Nelo Tovar"
+ "id" : "Mark Anderson"
},
{
- "name" : "Niels van Dijke",
"id" : "Niels van Dijke",
"data" : [
[
"Perl",
2
]
- ]
- },
- {
- "id" : "Packy Anderson",
- "data" : [
- [
- "Perl",
- 2
- ],
- [
- "Raku",
- 2
- ],
- [
- "Blog",
- 1
- ]
- ],
- "name" : "Packy Anderson"
- },
- {
- "data" : [
- [
- "Perl",
- 2
- ],
- [
- "Blog",
- 1
- ]
- ],
- "id" : "Peter Campbell Smith",
- "name" : "Peter Campbell Smith"
- },
- {
- "name" : "Peter Meszaros",
- "data" : [
- [
- "Perl",
- 2
- ]
],
- "id" : "Peter Meszaros"
- },
- {
- "name" : "Roger Bell_West",
- "data" : [
- [
- "Perl",
- 2
- ],
- [
- "Raku",
- 2
- ],
- [
- "Blog",
- 1
- ]
- ],
- "id" : "Roger Bell_West"
- },
- {
- "name" : "Simon Green",
- "data" : [
- [
- "Perl",
- 2
- ],
- [
- "Blog",
- 1
- ]
- ],
- "id" : "Simon Green"
- },
- {
- "id" : "Stephen G. Lynn",
- "data" : [
- [
- "Perl",
- 2
- ],
- [
- "Blog",
- 1
- ]
- ],
- "name" : "Stephen G. Lynn"
- },
- {
- "name" : "Thomas Kohler",
- "id" : "Thomas Kohler",
- "data" : [
- [
- "Perl",
- 2
- ],
- [
- "Blog",
- 2
- ]
- ]
- },
- {
- "name" : "Ulrich Rieke",
- "data" : [
- [
- "Perl",
- 2
- ],
- [
- "Raku",
- 2
- ]
- ],
- "id" : "Ulrich Rieke"
+ "name" : "Niels van Dijke"
},
{
"name" : "W. Luis Mochan",
- "id" : "W. Luis Mochan",
"data" : [
[
"Perl",
@@ -473,27 +55,73 @@
"Blog",
1
]
- ]
+ ],
+ "id" : "W. Luis Mochan"
}