aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad Sajid Anwar <mohammad.anwar@yahoo.com>2024-12-30 17:40:26 +0000
committerMohammad Sajid Anwar <mohammad.anwar@yahoo.com>2024-12-30 17:40:26 +0000
commita29c4dcd9e19a6abc6d9bb2df2cd9c55dcb7e0b2 (patch)
tree83e8204afdef68d1e5ecd7239372b29b484f8f5b
parente651f5a4493685cee95006e5dc3935ce0b4ed6c0 (diff)
downloadperlweeklychallenge-club-a29c4dcd9e19a6abc6d9bb2df2cd9c55dcb7e0b2.tar.gz
perlweeklychallenge-club-a29c4dcd9e19a6abc6d9bb2df2cd9c55dcb7e0b2.tar.bz2
perlweeklychallenge-club-a29c4dcd9e19a6abc6d9bb2df2cd9c55dcb7e0b2.zip
- Added solutions by Eric Cheung.
- Added solutions by David Ferrone. - Added solutions by Santiago Leyva. - Added solutions by Peter Meszaros. - Added solutions by Bob Lied. - Added solutions by W. Luis Mochan. - Added solutions by Jan Krnavek.
-rw-r--r--challenge-300/santiago-leyva/perl/ch-1.pl (renamed from challenge-300/santiago-leyva/perl/ch-01.pl)0
-rw-r--r--challenge-300/santiago-leyva/perl/ch-2.pl (renamed from challenge-300/santiago-leyva/perl/ch-02.pl)0
-rwxr-xr-xchallenge-302/eric-cheung/python/ch-1.py41
-rwxr-xr-xchallenge-302/eric-cheung/python/ch-2.py11
-rw-r--r--stats/pwc-challenge-300.json427
-rw-r--r--stats/pwc-challenge-301.json513
-rw-r--r--stats/pwc-current.json516
-rw-r--r--stats/pwc-language-breakdown-2019.json620
-rw-r--r--stats/pwc-language-breakdown-2020.json402
-rw-r--r--stats/pwc-language-breakdown-2021.json748
-rw-r--r--stats/pwc-language-breakdown-2022.json350
-rw-r--r--stats/pwc-language-breakdown-2023.json362
-rw-r--r--stats/pwc-language-breakdown-2024.json759
-rw-r--r--stats/pwc-language-breakdown-summary.json50
-rw-r--r--stats/pwc-leaders.json378
-rw-r--r--stats/pwc-summary-1-30.json24
-rw-r--r--stats/pwc-summary-121-150.json106
-rw-r--r--stats/pwc-summary-151-180.json28
-rw-r--r--stats/pwc-summary-181-210.json110
-rw-r--r--stats/pwc-summary-211-240.json108
-rw-r--r--stats/pwc-summary-241-270.json100
-rw-r--r--stats/pwc-summary-271-300.json32
-rw-r--r--stats/pwc-summary-301-330.json76
-rw-r--r--stats/pwc-summary-31-60.json46
-rw-r--r--stats/pwc-summary-61-90.json42
-rw-r--r--stats/pwc-summary-91-120.json100
-rw-r--r--stats/pwc-summary.json48
-rw-r--r--stats/pwc-yearly-language-summary.json98
28 files changed, 3156 insertions, 2939 deletions
diff --git a/challenge-300/santiago-leyva/perl/ch-01.pl b/challenge-300/santiago-leyva/perl/ch-1.pl
index 6877b081a0..6877b081a0 100644
--- a/challenge-300/santiago-leyva/perl/ch-01.pl
+++ b/challenge-300/santiago-leyva/perl/ch-1.pl
diff --git a/challenge-300/santiago-leyva/perl/ch-02.pl b/challenge-300/santiago-leyva/perl/ch-2.pl
index 73edff4827..73edff4827 100644
--- a/challenge-300/santiago-leyva/perl/ch-02.pl
+++ b/challenge-300/santiago-leyva/perl/ch-2.pl
diff --git a/challenge-302/eric-cheung/python/ch-1.py b/challenge-302/eric-cheung/python/ch-1.py
new file mode 100755
index 0000000000..8f2173d914
--- /dev/null
+++ b/challenge-302/eric-cheung/python/ch-1.py
@@ -0,0 +1,41 @@
+
+## Ref.:
+## https://leetcode.com/problems/ones-and-zeroes/description/
+## https://stackoverflow.com/questions/1482308/how-to-get-all-subsets-of-a-set-powerset
+
+from itertools import chain, combinations
+
+def GetPowSet(arrSet):
+ return chain.from_iterable(combinations(arrSet, arrSubLoop) for arrSubLoop in range(len(arrSet), 0, -1))
+
+## Example 1
+arrStr = ["10", "0001", "111001", "1", "0"]
+nX = 5
+nY = 3
+
+## Example 2
+## arrStr = ["10", "1", "0"]
+## nX = 1
+## nY = 1
+
+nMaxLenSubSet = 0
+
+for arrLoop in list(GetPowSet(arrStr)):
+ setLoop = list(arrLoop)
+
+ ## print (setLoop)
+
+ nCountOne = sum([strLoop.count("1") for strLoop in setLoop])
+ nCountZero = sum([strLoop.count("0") for strLoop in setLoop])
+
+ if nCountZero > nX:
+ continue
+
+ if nCountOne > nY:
+ continue
+
+ if len(setLoop) > nMaxLenSubSet:
+ nMaxLenSubSet = len(setLoop)
+ break
+
+print (nMaxLenSubSet)
diff --git a/challenge-302/eric-cheung/python/ch-2.py b/challenge-302/eric-cheung/python/ch-2.py
new file mode 100755
index 0000000000..cb631e67fe
--- /dev/null
+++ b/challenge-302/eric-cheung/python/ch-2.py
@@ -0,0 +1,11 @@
+
+arrInts = [-3, 2, -3, 4, 2] ## Example 1
+## arrInts = [1, 2] ## Example 2
+## arrInts = [1, -2, -3] ## Example 3
+
+arrOutput = [1]
+
+for nIndx in range(1, len(arrInts) + 1):
+ arrOutput.append(1 - sum(arrInts[:nIndx]))
+
+print (max(arrOutput))
diff --git a/stats/pwc-challenge-300.json b/stats/pwc-challenge-300.json
index bfdc9b1839..0da2e5c65a 100644
--- a/stats/pwc-challenge-300.json
+++ b/stats/pwc-challenge-300.json
@@ -1,4 +1,155 @@
{
+ "title" : {
+ "text" : "The Weekly Challenge - 300"
+ },
+ "series" : [
+ {
+ "data" : [
+ {
+ "name" : "Ali Moradi",
+ "y" : 3,
+ "drilldown" : "Ali Moradi"
+ },
+ {
+ "drilldown" : "Arne Sommer",
+ "y" : 3,
+ "name" : "Arne Sommer"
+ },
+ {
+ "name" : "Athanasius",
+ "y" : 4,
+ "drilldown" : "Athanasius"
+ },
+ {
+ "drilldown" : "BarrOff",
+ "name" : "BarrOff",
+ "y" : 1
+ },
+ {
+ "drilldown" : "Bob Lied",
+ "name" : "Bob Lied",
+ "y" : 2
+ },
+ {
+ "y" : 3,
+ "name" : "Dave Jacoby",
+ "drilldown" : "Dave Jacoby"
+ },
+ {
+ "name" : "David Ferrone",
+ "y" : 2,
+ "drilldown" : "David Ferrone"
+ },
+ {
+ "y" : 2,
+ "name" : "E. Choroba",
+ "drilldown" : "E. Choroba"
+ },
+ {
+ "name" : "Feng Chang",
+ "y" : 2,
+ "drilldown" : "Feng Chang"
+ },
+ {
+ "drilldown" : "Jaldhar H. Vyas",
+ "y" : 5,
+ "name" : "Jaldhar H. Vyas"
+ },
+ {
+ "drilldown" : "Jorg Sommrey",
+ "y" : 3,
+ "name" : "Jorg Sommrey"
+ },
+ {
+ "drilldown" : "Luca Ferrari",
+ "y" : 4,
+ "name" : "Luca Ferrari"
+ },
+ {
+ "drilldown" : "Mark Anderson",
+ "name" : "Mark Anderson",
+ "y" : 2
+ },
+ {
+ "name" : "Matthew Neleigh",
+ "y" : 2,
+ "drilldown" : "Matthew Neleigh"
+ },
+ {
+ "drilldown" : "Peter Campbell Smith",
+ "y" : 3,
+ "name" : "Peter Campbell Smith"
+ },
+ {
+ "y" : 2,
+ "name" : "Peter Meszaros",
+ "drilldown" : "Peter Meszaros"
+ },
+ {
+ "drilldown" : "Robbie Hatley",
+ "y" : 3,
+ "name" : "Robbie Hatley"
+ },
+ {
+ "drilldown" : "Robert McIntosh",
+ "y" : 2,
+ "name" : "Robert McIntosh"
+ },
+ {
+ "y" : 2,
+ "name" : "Robert Ransbottom",
+ "drilldown" : "Robert Ransbottom"
+ },
+ {
+ "drilldown" : "Roger Bell_West",
+ "y" : 5,
+ "name" : "Roger Bell_West"
+ },
+ {
+ "y" : 3,
+ "name" : "Ryan Thompson",
+ "drilldown" : "Ryan Thompson"
+ },
+ {
+ "name" : "Santiago Leyva",
+ "y" : 2,
+ "drilldown" : "Santiago Leyva"
+ },
+ {
+ "name" : "Simon Green",
+ "y" : 3,
+ "drilldown" : "Simon Green"
+ },
+ {
+ "name" : "Thomas Kohler",
+ "y" : 2,
+ "drilldown" : "Thomas Kohler"
+ },
+ {
+ "drilldown" : "Torgny Lyon",
+ "name" : "Torgny Lyon",
+ "y" : 2
+ },
+ {
+ "y" : 4,
+ "name" : "Ulrich Rieke",
+ "drilldown" : "Ulrich Rieke"
+ },
+ {
+ "drilldown" : "W. Luis Mochan",
+ "y" : 3,
+ "name" : "W. Luis Mochan"
+ },
+ {
+ "drilldown" : "Wanderdoc",
+ "y" : 2,
+ "name" : "Wanderdoc"
+ }
+ ],
+ "colorByPoint" : 1,
+ "name" : "The Weekly Challenge - 300"
+ }
+ ],
"chart" : {
"type" : "column"
},
@@ -11,26 +162,14 @@
}
}
},
- "title" : {
- "text" : "The Weekly Challenge - 300"
- },
- "yAxis" : {
- "title" : {
- "text" : "Total Solutions"
- }
- },
- "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/>"
- },
- "subtitle" : {
- "text" : "[Champions: 27] Last updated at 2024-12-26 20:24:03 GMT"
+ "xAxis" : {
+ "type" : "category"
},
"drilldown" : {
"series" : [
{
"name" : "Ali Moradi",
+ "id" : "Ali Moradi",
"data" : [
[
"Perl",
@@ -40,11 +179,10 @@
"Blog",
1
]
- ],
- "id" : "Ali Moradi"
+ ]
},
{
- "name" : "Arne Sommer",
+ "id" : "Arne Sommer",
"data" : [
[
"Raku",
@@ -55,9 +193,10 @@
1
]
],
- "id" : "Arne Sommer"
+ "name" : "Arne Sommer"
},
{
+ "id" : "Athanasius",
"data" : [
[
"Perl",
@@ -68,32 +207,29 @@
2
]
],
- "id" : "Athanasius",
"name" : "Athanasius"
},
{
"name" : "BarrOff",
- "id" : "BarrOff",
"data" : [
[
"Raku",
1
]
- ]
+ ],
+ "id" : "BarrOff"
},
{
- "id" : "Bob Lied",
+ "name" : "Bob Lied",
"data" : [
[
"Perl",
2
]
],
- "name" : "Bob Lied"
+ "id" : "Bob Lied"
},
{
- "name" : "Dave Jacoby",
- "id" : "Dave Jacoby",
"data" : [
[
"Perl",
@@ -103,39 +239,42 @@
"Blog",
1
]
- ]
+ ],
+ "id" : "Dave Jacoby",
+ "name" : "Dave Jacoby"
},
{
- "id" : "David Ferrone",
"data" : [
[
"Perl",
2
]
],
+ "id" : "David Ferrone",
"name" : "David Ferrone"
},
{
- "name" : "E. Choroba",
"data" : [
[
"Perl",
2
]
],
- "id" : "E. Choroba"
+ "id" : "E. Choroba",
+ "name" : "E. Choroba"
},
{
- "id" : "Feng Chang",
"data" : [
[
"Raku",
2
]
],
+ "id" : "Feng Chang",
"name" : "Feng Chang"
},
{
+ "id" : "Jaldhar H. Vyas",
"data" : [
[
"Perl",
@@ -150,11 +289,9 @@
1
]
],
- "id" : "Jaldhar H. Vyas",
"name" : "Jaldhar H. Vyas"
},
{
- "id" : "Jorg Sommrey",
"data" : [
[
"Perl",
@@ -165,11 +302,11 @@
1
]
],
+ "id" : "Jorg Sommrey",
"name" : "Jorg Sommrey"
},
{
"name" : "Luca Ferrari",
- "id" : "Luca Ferrari",
"data" : [
[
"Raku",
@@ -179,29 +316,31 @@
"Blog",
2
]
- ]
+ ],
+ "id" : "Luca Ferrari"
},
{
"name" : "Mark Anderson",
- "id" : "Mark Anderson",
"data" : [
[
"Raku",
2
]
- ]
+ ],
+ "id" : "Mark Anderson"
},
{
+ "name" : "Matthew Neleigh",
"data" : [
[
"Perl",
2
]
],
- "id" : "Matthew Neleigh",
- "name" : "Matthew Neleigh"
+ "id" : "Matthew Neleigh"
},
{
+ "id" : "Peter Campbell Smith",
"data" : [
[
"Perl",
@@ -212,17 +351,16 @@
1
]
],
- "id" : "Peter Campbell Smith",
"name" : "Peter Campbell Smith"
},
{
- "id" : "Peter Meszaros",
"data" : [
[
"Perl",
2
]
],
+ "id" : "Peter Meszaros",
"name" : "Peter Meszaros"
},
{
@@ -240,14 +378,14 @@
]
},
{
- "name" : "Robert McIntosh",
"id" : "Robert McIntosh",
"data" : [
[
"Blog",
2
]
- ]
+ ],
+ "name" : "Robert McIntosh"
},
{
"name" : "Robert Ransbottom",
@@ -260,7 +398,6 @@
]
},
{
- "name" : "Roger Bell_West",
"data" : [
[
"Perl",
@@ -275,10 +412,11 @@
1
]
],
- "id" : "Roger Bell_West"
+ "id" : "Roger Bell_West",
+ "name" : "Roger Bell_West"
},
{
- "name" : "Ryan Thompson",
+ "id" : "Ryan Thompson",
"data" : [
[
"Perl",
@@ -289,9 +427,21 @@
1
]
],
- "id" : "Ryan Thompson"
+ "name" : "Ryan Thompson"
+ },
+ {
+ "name" : "Santiago Leyva",
+ "id" : "Santiago Leyva",
+ "data" : [
+ [
+ "Perl",
+ 2
+ ]
+ ]
},
{
+ "name" : "Simon Green",
+ "id" : "Simon Green",
"data" : [
[
"Perl",
@@ -301,11 +451,11 @@
"Blog",
1
]
- ],
- "id" : "Simon Green",
- "name" : "Simon Green"
+ ]
},
{
+ "name" : "Thomas Kohler",
+ "id" : "Thomas Kohler",
"data" : [
[
"Perl",
@@ -315,21 +465,20 @@
"Blog",
1
]
- ],
- "id" : "Thomas Kohler",
- "name" : "Thomas Kohler"
+ ]
},
{
- "name" : "Torgny Lyon",
+ "id" : "Torgny Lyon",
"data" : [
[
"Perl",
2
]
],
- "id" : "Torgny Lyon"
+ "name" : "Torgny Lyon"
},
{
+ "id" : "Ulrich Rieke",
"data" : [
[
"Perl",
@@ -340,10 +489,11 @@
2
]
],
- "id" : "Ulrich Rieke",
"name" : "Ulrich Rieke"
},
{
+ "name" : "W. Luis Mochan",
+ "id" : "W. Luis Mochan",
"data" : [
[
"Perl",
@@ -353,169 +503,34 @@
"Blog",
1
]
- ],
- "id" : "W. Luis Mochan",
- "name" : "W. Luis Mochan"
+ ]
},
{
+ "name" : "Wanderdoc",
"data" : [
[
"Perl",
2
]
],
- "id" : "Wanderdoc",
- "name" : "Wanderdoc"
+ "id" : "Wanderdoc"
}
]
},
- "xAxis" : {
- "type" : "category"
- },
- "series" : [
- {
- "colorByPoint" : 1,
- "data" : [
- {
- "y" : 3,
- "drilldown" : "Ali Moradi",
- "name" : "Ali Moradi"
- },
- {
- "name" : "Arne Sommer",
- "y" : 3,
- "drilldown" : "Arne Sommer"
- },
- {
- "drilldown" : "Athanasius",
- "y" : 4,
- "name" : "Athanasius"
- },
- {
- "name" : "BarrOff",
- "drilldown" : "BarrOff",
- "y" : 1
- },
- {
- "y" : 2,
- "drilldown" : "Bob Lied",
- "name" : "Bob Lied"
- },
- {
- "y" : 3,
- "drilldown" : "Dave Jacoby",
- "name" : "Dave Jacoby"
- },
- {
- "drilldown" : "David Ferrone",
- "y" : 2,
- "name" : "David Ferrone"
- },
- {
- "name" : "E. Choroba",
- "y" : 2,
- "drilldown" : "E. Choroba"
- },
- {
- "y" : 2,
- "drilldown" : "Feng Chang",
- "name" : "Feng Chang"
- },
- {
- "name" : "Jaldhar H. Vyas",
- "y" : 5,
- "drilldown" : "Jaldhar H. Vyas"
- },
- {
- "name" : "Jorg Sommrey",
- "drilldown" : "Jorg Sommrey",
- "y" : 3
- },
- {
- "name" : "Luca Ferrari",
- "y" : 4,
- "drilldown" : "Luca Ferrari"
- },
- {
- "y" : 2,
- "drilldown" : "Mark Anderson",
- "name" : "Mark Anderson"
- },
- {
- "name" : "Matthew Neleigh",
- "y" : 2,
- "drilldown" : "Matthew Neleigh"
- },
- {
- "name" : "Peter Campbell Smith",
- "y" : 3,
- "drilldown" : "Peter Campbell Smith"
- },
- {
- "name" : "Peter Meszaros",
- "y" : 2,
- "drilldown" : "Peter Meszaros"
- },
- {
- "name" : "Robbie Hatley",
- "drilldown" : "Robbie Hatley",
- "y" : 3
- },
- {
- "name" : "Robert McIntosh",
- "y" : 2,
- "drilldown" : "Robert McIntosh"
- },
- {
- "name" : "Robert Ransbottom",
- "y" : 2,
- "drilldown" : "Robert Ransbottom"
- },
- {
- "y" : 5,
- "drilldown" : "Roger Bell_West",
- "name" : "Roger Bell_West"
- },
- {
- "name" : "Ryan Thompson",
- "drilldown" : "Ryan Thompson",
- "y" : 3
- },
- {
- "drilldown" : "Simon Green",
- "y" : 3,
- "name" : "Simon Green"
- },
- {
- "name" : "Thomas Kohler",
- "y" : 2,
- "drilldown" : "Thomas Kohler"
- },
- {
- "drilldown" : "Torgny Lyon",
- "y" : 2,
- "name" : "Torgny Lyon"
- },
- {
- "name" : "Ulrich Rieke",
- "y" : 4,
- "drilldown" : "Ulrich Rieke"
- },
- {
- "y" : 3,
- "drilldown" : "W. Luis Mochan",
- "name" : "W. Luis Mochan"
- },
- {
- "name" : "Wanderdoc",
- "drilldown" : "Wanderdoc",
- "y" : 2
- }
- ],
- "name" : "The Weekly Challenge - 300"
+ "yAxis" : {
+ "title" : {
+ "text" : "Total Solutions"
}
- ],
+ },
"legend" : {
"enabled" : 0
+ },
+ "subtitle" : {
+ "text" : "[Champions: 28] Last updated at 2024-12-30 17:37:41 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-challenge-301.json b/stats/pwc-challenge-301.json
new file mode 100644
index 0000000000..1deb2971ac
--- /dev/null
+++ b/stats/pwc-challenge-301.json
@@ -0,0 +1,513 @@
+{
+ "subtitle" : {
+ "text" : "[Champions: 27] Last updated at 2024-12-30 17:37:41 GMT"
+ },
+ "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/>"
+ },
+ "xAxis" : {
+ "type" : "category"
+ },
+ "drilldown" : {
+ "series" : [
+ {
+ "name" : "Ali Moradi",
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ],
+ "id" : "Ali Moradi"
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ]
+ ],
+ "id" : "Andreas Mahnke",
+ "name" : "Andreas Mahnke"
+ },
+ {
+ "data" : [
+ [
+ "Raku",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ],
+ "id" : "Arne Sommer",
+ "name" : "Arne Sommer"
+ },
+ {
+ "id" : "Athanasius",
+ "data" : [
+ [
+ "Perl",
+ 1
+ ],
+ [
+ "Raku",
+ 1
+ ]
+ ],
+ "name" : "Athanasius"
+ },
+ {
+ "name" : "BarrOff",
+ "data" : [
+ [
+ "Raku",
+ 1
+ ]
+ ],
+ "id" : "BarrOff"
+ },
+ {
+ "name" : "Bob Lied",
+ "data" : [
+ [
+ "Perl",
+ 2
+ ]
+ ],
+ "id" : "Bob Lied"
+ },
+ {
+ "name" : "Bruno Ramos",
+ "id" : "Bruno Ramos",
+ "data" : [
+ [
+ "Perl",
+ 2
+ ]
+ ]
+ },
+ {
+ "name" : "Dave Jacoby",
+ "id" : "Dave Jacoby",
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ]
+ },
+ {
+ "id" : "David Ferrone",
+ "data" : [
+ [
+ "Perl",
+ 2
+ ]
+ ],
+ "name" : "David Ferrone"
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ]
+ ],
+ "id" : "E. Choroba",
+ "name" : "E. Choroba"
+ },
+ {
+ "name" : "Feng Chang",
+ "id" : "Feng Chang",
+ "data" : [
+ [
+ "Raku",
+ 2
+ ]
+ ]
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Raku",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ],
+ "id" : "Jaldhar H. Vyas",
+ "name" : "Jaldhar H. Vyas"
+ },
+ {
+ "name" : "Jan Krnavek",
+ "data" : [
+ [
+ "Raku",
+ 2
+ ]
+ ],
+ "id" : "Jan Krnavek"
+ },
+ {
+ "name" : "Mark Anderson",
+ "data" : [
+ [
+ "Raku",
+ 2
+ ]
+ ],
+ "id" : "Mark Anderson"
+ },
+ {
+ "id" : "Matthew Neleigh",
+ "data" : [
+ [
+ "Perl",
+ 2
+ ]
+ ],
+ "name" : "Matthew Neleigh"
+ },
+ {
+ "name"