diff options
| -rwxr-xr-x | challenge-254/wanderdoc/perl/ch-1.pl | 38 | ||||
| -rwxr-xr-x | challenge-254/wanderdoc/perl/ch-2.pl | 48 | ||||
| -rw-r--r-- | stats/pwc-current.json | 412 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown-summary.json | 68 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown.json | 1436 | ||||
| -rw-r--r-- | stats/pwc-leaders.json | 712 | ||||
| -rw-r--r-- | stats/pwc-summary-1-30.json | 118 | ||||
| -rw-r--r-- | stats/pwc-summary-121-150.json | 24 | ||||
| -rw-r--r-- | stats/pwc-summary-151-180.json | 48 | ||||
| -rw-r--r-- | stats/pwc-summary-181-210.json | 38 | ||||
| -rw-r--r-- | stats/pwc-summary-211-240.json | 26 | ||||
| -rw-r--r-- | stats/pwc-summary-241-270.json | 112 | ||||
| -rw-r--r-- | stats/pwc-summary-271-300.json | 104 | ||||
| -rw-r--r-- | stats/pwc-summary-301-330.json | 50 | ||||
| -rw-r--r-- | stats/pwc-summary-31-60.json | 108 | ||||
| -rw-r--r-- | stats/pwc-summary-61-90.json | 40 | ||||
| -rw-r--r-- | stats/pwc-summary-91-120.json | 128 | ||||
| -rw-r--r-- | stats/pwc-summary.json | 656 |
18 files changed, 2141 insertions, 2025 deletions
diff --git a/challenge-254/wanderdoc/perl/ch-1.pl b/challenge-254/wanderdoc/perl/ch-1.pl new file mode 100755 index 0000000000..9c3d517a5c --- /dev/null +++ b/challenge-254/wanderdoc/perl/ch-1.pl @@ -0,0 +1,38 @@ +#!perl
+use strict;
+use warnings FATAL => qw(all);
+
+=prompt
+You are given a positive integer, $n. Write a script to return true if the given integer is a power of three otherwise return false.
+Example 1 Input: $n = 27 Output: true 27 = 3 ^ 3
+Example 2 Input: $n = 0 Output: false
+Example 3 Input: $n = 6 Output: false
+=cut
+
+
+
+
+
+
+use Test2::V0;
+
+sub is_power_of_N
+{
+ my ($num, $N) = @_;
+ return 0 if ( $num < 1 );
+ while ( $num % $N == 0 )
+ {
+ $num /= $N;
+ }
+ if ( 1 == $num )
+ {
+ return 1;
+ }
+ return 0;
+}
+
+is(is_power_of_N(27, 3), 1, 'Example 1');
+is(is_power_of_N( 0, 3), 0, 'Example 2');
+is(is_power_of_N( 6, 3), 0, 'Example 3');
+
+done_testing();
\ No newline at end of file diff --git a/challenge-254/wanderdoc/perl/ch-2.pl b/challenge-254/wanderdoc/perl/ch-2.pl new file mode 100755 index 0000000000..e2b3bea1f0 --- /dev/null +++ b/challenge-254/wanderdoc/perl/ch-2.pl @@ -0,0 +1,48 @@ +#!perl
+use strict;
+use warnings FATAL => qw(all);
+
+=prompt
+You are given a string, $s.Write a script to reverse all the vowels (a, e, i, o, u) in the given string.
+Example 1 Input: $s = "Raku" Output: "Ruka"
+Example 2 Input: $s = "Perl" Output: "Perl"
+Example 3 Input: $s = "Julia" Output: "Jaliu""
+=cut
+
+
+
+
+
+
+use Test2::V0;
+
+sub reverse_vowels
+{
+ my $string = $_[0];
+ my @vowels = qw(a e i o u);
+ my $vowels_str = join('|', @vowels);
+ my $vowels_re = qr/$vowels_str/i;
+
+ my @this_vowels = $string =~ /($vowels_re)/g;
+
+ my $first_uc = 0;
+ if ( $this_vowels[0] =~ /\p{Uppercase}/ ) # [A-Z] )
+ {
+ $first_uc = 1;
+ };
+
+ $string =~ s/$vowels_re/pop @this_vowels/eg;
+
+ if ( 1 == $first_uc )
+ {
+ $string = ucfirst (lc $string);
+ }
+
+ return $string;
+}
+
+is(reverse_vowels("Raku"), "Ruka", "Example 1");
+is(reverse_vowels("Perl"), "Perl", "Example 2");
+is(reverse_vowels("Julia"), "Jaliu", "Example 3");
+
+done_testing();
\ No newline at end of file diff --git a/stats/pwc-current.json b/stats/pwc-current.json index d062dca14c..ca89abb4da 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,19 +1,184 @@ { + "series" : [ + { + "data" : [ + { + "y" : 3, + "drilldown" : "Ali Moradi", + "name" : "Ali Moradi" + }, + { + "drilldown" : "Arne Sommer", + "y" : 3, + "name" : "Arne Sommer" + }, + { + "name" : "Athanasius", + "y" : 4, + "drilldown" : "Athanasius" + }, + { + "drilldown" : "Bob Lied", + "y" : 3, + "name" : "Bob Lied" + }, + { + "name" : "Dave Jacoby", + "drilldown" : "Dave Jacoby", + "y" : 3 + }, + { + "name" : "David Ferrone", + "y" : 2, + "drilldown" : "David Ferrone" + }, + { + "name" : "E. Choroba", + "drilldown" : "E. Choroba", + "y" : 2 + }, + { + "drilldown" : "Humberto Massa", + "y" : 2, + "name" : "Humberto Massa" + }, + { + "name" : "Jan Krnavek", + "y" : 2, + "drilldown" : "Jan Krnavek" + }, + { + "drilldown" : "Jorg Sommrey", + "y" : 3, + "name" : "Jorg Sommrey" + }, + { + "name" : "Laurent Rosenfeld", + "y" : 6, + "drilldown" : "Laurent Rosenfeld" + }, + { + "name" : "Lubos Kolouch", + "y" : 4, + "drilldown" : "Lubos Kolouch" + }, + { + "drilldown" : "Luca Ferrari", + "y" : 11, + "name" : "Luca Ferrari" + }, + { + "name" : "Mark Anderson", + "y" : 2, + "drilldown" : "Mark Anderson" + }, + { + "drilldown" : "Matthew Neleigh", + "y" : 2, + "name" : "Matthew Neleigh" + }, + { + "drilldown" : "Nelo Tovar", + "y" : 2, + "name" : "Nelo Tovar" + }, + { + "name" : "Niels van Dijke", + "y" : 2, + "drilldown" : "Niels van Dijke" + }, + { + "name" : "Packy Anderson", + "y" : 5, + "drilldown" : "Packy Anderson" + }, + { + "name" : "Peter Campbell Smith", + "y" : 3, + "drilldown" : "Peter Campbell Smith" + }, + { + "name" : "Peter Meszaros", + "drilldown" : "Peter Meszaros", + "y" : 2 + }, + { + "drilldown" : "Robbie Hatley", + "y" : 3, + "name" : "Robbie Hatley" + }, + { + "name" : "Robert Ransbottom", + "y" : 2, + "drilldown" : "Robert Ransbottom" + }, + { + "y" : 5, + "drilldown" : "Roger Bell_West", + "name" : "Roger Bell_West" + }, + { + "name" : "Simon Green", + "drilldown" : "Simon Green", + "y" : 3 + }, + { + "name" : "Stephen G. Lynn", + "drilldown" : "Stephen G. Lynn", + "y" : 3 + }, + { + "name" : "Thomas Kohler", + "y" : 4, + "drilldown" : "Thomas Kohler" + }, + { + "name" : "Ulrich Rieke", + "y" : 4, + "drilldown" : "Ulrich Rieke" + }, + { + "y" : 3, + "drilldown" : "W. Luis Mochan", + "name" : "W. Luis Mochan" + }, + { + "drilldown" : "Wanderdoc", + "y" : 2, + "name" : "Wanderdoc" + } + ], + "name" : "The Weekly Challenge - 254", + "colorByPoint" : 1 + } + ], + "tooltip" : { + "pointFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>", + "followPointer" : 1, + "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>" + }, "plotOptions" : { "series" : { + "borderWidth" : 0, "dataLabels" : { "format" : "{point.y}", "enabled" : 1 - }, - "borderWidth" : 0 + } } }, - "title" : { - "text" : "The Weekly Challenge - 254" + "chart" : { + "type" : "column" + }, + "legend" : { + "enabled" : 0 + }, + "subtitle" : { + "text" : "[Champions: 29] Last updated at 2024-02-04 18:01:18 GMT" }, "drilldown" : { "series" : [ { + "name" : "Ali Moradi", "data" : [ [ "Perl", @@ -24,10 +189,10 @@ 1 ] ], - "id" : "Ali Moradi", - "name" : "Ali Moradi" + "id" : "Ali Moradi" }, { + "id" : "Arne Sommer", "data" : [ [ "Raku", @@ -38,7 +203,6 @@ 1 ] ], - "id" : "Arne Sommer", "name" : "Arne Sommer" }, { @@ -56,7 +220,6 @@ "id" : "Athanasius" }, { - "id" : "Bob Lied", "data" : [ [ "Perl", @@ -67,10 +230,11 @@ 1 ] ], + "id" : "Bob Lied", "name" : "Bob Lied" }, { - "id" : "Dave Jacoby", + "name" : "Dave Jacoby", "data" : [ [ "Perl", @@ -81,40 +245,49 @@ 1 ] ], - "name" : "Dave Jacoby" + "id" : "Dave Jacoby" }, { - "id" : "David Ferrone", "data" : [ [ "Perl", 2 ] ], + "id" : "David Ferrone", "name" : "David Ferrone" }, { - "name" : "E. Choroba", "data" : [ [ "Perl", 2 ] ], + "name" : "E. Choroba", "id" : "E. Choroba" }, { - "name" : "Humberto Massa", "data" : [ [ "Raku", 2 ] ], - "id" : "Humberto Massa" + "id" : "Humberto Massa", + "name" : "Humberto Massa" + }, + { + "id" : "Jan Krnavek", + "data" : [ + [ + "Raku", + 2 + ] + ], + "name" : "Jan Krnavek" }, { - "name" : "Jorg Sommrey", "data" : [ [ "Perl", @@ -125,10 +298,10 @@ 1 ] ], + "name" : "Jorg Sommrey", "id" : "Jorg Sommrey" }, { - "id" : "Laurent Rosenfeld", "data" : [ [ "Perl", @@ -143,6 +316,7 @@ 2 ] ], + "id" : "Laurent Rosenfeld", "name" : "Laurent Rosenfeld" }, { @@ -156,10 +330,11 @@ 2 ] ], - "id" : "Lubos Kolouch", - "name" : "Lubos Kolouch" + "name" : "Lubos Kolouch", + "id" : "Lubos Kolouch" }, { + "name" : "Luca Ferrari", "data" : [ [ "Raku", @@ -170,18 +345,17 @@ 9 ] ], - "id" : "Luca Ferrari", - "name" : "Luca Ferrari" + "id" : "Luca Ferrari" }, { + "id" : "Mark Anderson", "data" : [ [ "Raku", 2 ] ], - "name" : "Mark Anderson", - "id" : "Mark Anderson" + "name" : "Mark Anderson" }, { "data" : [ @@ -204,14 +378,14 @@ "id" : "Nelo Tovar" }, { + "id" : "Niels van Dijke", "data" : [ [ "Perl", 2 ] ], - "name" : "Niels van Dijke", - "id" : "Niels van Dijke" + "name" : "Niels van Dijke" }, { "data" : [ @@ -246,17 +420,17 @@ "id" : "Peter Campbell Smith" }, { - "id" : "Peter Meszaros", "data" : [ [ "Perl", 2 ] ], + "id" : "Peter Meszaros", "name" : "Peter Meszaros" }, { - "id" : "Robbie Hatley", + "name" : "Robbie Hatley", "data" : [ [ "Perl", @@ -267,20 +441,19 @@ 1 ] ], - "name" : "Robbie Hatley" + "id" : "Robbie Hatley" }, { + "id" : "Robert Ransbottom", "data" : [ [ "Raku", 2 ] ], - "id" : "Robert Ransbottom", "name" : "Robert Ransbottom" }, { - "id" : "Roger Bell_West", "data" : [ [ "Perl", @@ -295,6 +468,7 @@ 1 ] ], + "id" : "Roger Bell_West", "name" : "Roger Bell_West" }, { @@ -322,8 +496,8 @@ 1 ] ], - "id" : "Stephen G. Lynn", - "name" : "Stephen G. Lynn" + "name" : "Stephen G. Lynn", + "id" : "Stephen G. Lynn" }, { "data" : [ @@ -336,8 +510,8 @@ 2 ] ], - "id" : "Thomas Kohler", - "name" : "Thomas Kohler" + "name" : "Thomas Kohler", + "id" : "Thomas Kohler" }, { "name" : "Ulrich Rieke", @@ -354,6 +528,7 @@ "id" : "Ulrich Rieke" }, { + "name" : "W. Luis Mochan", "data" : [ [ "Perl", @@ -364,174 +539,29 @@ 1 ] ], - "id" : "W. Luis Mochan", - "name" : "W. Luis Mochan" + "id" : "W. Luis Mochan" + }, + { + "name" : "Wanderdoc", + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Wanderdoc" } ] }, - "chart" : { - "type" : "column" - }, "yAxis" : { "title" : { "text" : "Total Solutions" } }, - "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/>" - }, - "series" : [ - { - "colorByPoint" : 1, - "name" : "The Weekly Challenge - 254", - "data" : [ - { - "drilldown" : "Ali Moradi", - "name" : "Ali Moradi", - "y" : 3 - }, - { - "y" : 3, - "name" : "Arne Sommer", - "drilldown" : "Arne Sommer" - }, - { - "drilldown" : "Athanasius", - "name" : "Athanasius", - "y" : 4 - }, - { - "y" : 3, - "name" : "Bob Lied", - "drilldown" : "Bob Lied" - }, - { - "name" : "Dave Jacoby", - "y" : 3, - "drilldown" : "Dave Jacoby" - }, - { - "drilldown" : "David Ferrone", - "y" : 2, - "name" : "David Ferrone" - }, - { - "drilldown" : "E. Choroba", - "y" : 2, - "name" : "E. Choroba" - }, - { - "name" : "Humberto Massa", - "y" : 2, - "drilldown" : "Humberto Massa" - }, - { - "name" : "Jorg Sommrey", - "y" : 3, - "drilldown" : "Jorg Sommrey" - }, - { - "y" : 6, - "name" : "Laurent Rosenfeld", - "drilldown" : "Laurent Rosenfeld" - }, - { - "name" : "Lubos Kolouch", - "y" : 4, - "drilldown" : "Lubos Kolouch" - }, - { - "y" : 11, - "name" : "Luca Ferrari", - "drilldown" : "Luca Ferrari" - }, - { - "y" : 2, - "name" : "Mark Anderson", - "drilldown" : "Mark Anderson" - }, - { - "drilldown" : "Matthew Neleigh", - "y" : 2, - "name" : "Matthew Neleigh" - }, - { - "drilldown" : "Nelo Tovar", - "name" : "Nelo Tovar", - "y" : 2 - }, - { - "y" : 2, - "name" : "Niels van Dijke", - "drilldown" : "Niels van Dijke" - }, - { - "drilldown" : "Packy Anderson", - "name" : "Packy Anderson", - "y" : 5 - }, - { - "y" : 3, - "name" : "Peter Campbell Smith", - "drilldown" : "Peter Campbell Smith" - }, - { - "name" : "Peter Meszaros", - "y" : 2, - "drilldown" : "Peter Meszaros" - }, - { - "name" : "Robbie Hatley", - "y" : 3, - "drilldown" : "Robbie Hatley" - }, - { - "name" : "Robert Ransbottom", - "y" : 2, - "drilldown" : "Robert Ransbottom" - }, - { - "name" : "Roger Bell_West", - "y" : 5, - "drilldown" : "Roger Bell_West" - }, - { - "drilldown" : "Simon Green", - "y" : 3, - "name" : "Simon Green" - }, - { - "y" : 3, - "name" : "Stephen G. Lynn", - "drilldown" : "Stephen G. Lynn" - }, - { - "drilldown" : "Thomas Kohler", - "y" : 4, - "name" : "Thomas Kohler" - }, - { - "name" : "Ulrich Rieke", - "y" : 4, - "drilldown" : "Ulrich Rieke" - }, - { - "name" : "W. Luis Mochan", - "y" : 3, - "drilldown" : "W. Luis Mochan" - } - ] - } - ], - "legend" : { - "enabled" : 0 + "title" : { + "text" : "The Weekly Challenge - 254" }, "xAxis" : { "type" : "category" - }, - "subtitle" : { - "text" : "[Champions: 27] Last updated at 2024-02-04 12:40:50 GMT" } } diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index 57b93509a2..5faaf1c634 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -1,37 +1,42 @@ { - "chart" : { - "type" : "column" - }, - "yAxis" : { - "title" : { - "text" : null - }, - "min" : 0 - }, - "tooltip" : { - "pointFormat" : "<b>{point.y:.0f}</b>" - }, - "title" : { - "text" : "The Weekly Challenge Contributions [2019 - 2024]" + "subtitle" : { + "text" : "Last updated at 2024-02-04 18:01:18 GMT" }, "legend" : { "enabled" : "false" }, "xAxis" : { + "type" : "category", "labels" : { "style" : { "fontFamily" : "Verdana, sans-serif", "fontSize" : "13px" } - }, - "type" : "category" + } }, - "subtitle" : { - "text" : "Last updated at 2024-02-04 12:40:50 GMT" + "title" : { + "text" : "The Weekly Challenge Contributions [2019 - 2024]" + }, + "yAxis" : { + "min" : 0, + "title" : { + "text" : null + } }, "series" : [ { - "name" : "Contributions", + "dataLabels" : { + "y" : 10, + "align" : "right", + "rotation" : -90, + "color" : "#FFFFFF", + "format" : "{point.y:.0f}", + "enabled" : "true", + "style" : { + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" + } + }, "data" : [ [ "Blog", @@ -39,25 +44,20 @@ ], [ "Perl", - 13123 + 13125 ], [ "Raku", - 7573 + 7575 ] ], - "dataLabels" : { - "format" : "{point.y:.0f}", - "align" : "right", - "style" : { - "fontSize" : "13px", - "fontFamily" : "Verdana, sans-serif" - }, - "enabled" : "true", - "color" : "#FFFFFF", - "rotation" : -90, - "y" : 10 - } + "name" : "Contributions" } - ] + ], + "tooltip" : { + "pointFormat" : "<b>{point.y:.0f}</b>" + }, + "chart" : { + "type" : "column" + } } diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json index 4d74ad71fd..ff5bd4b573 100644 --- a/stats/pwc-language-breakdown.json +++ b/stats/pwc-language-breakdown.json @@ -1,30 +1,8 @@ { - "chart" : { - "type" : "column" - }, - "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" - } - }, - "plotOptions" : { - "series" : { - "borderWidth" : 0, - "dataLabels" : { - "format" : "{point.y}", - "enabled" : 1 - } - } - }, "drilldown" : { "series" : [ { - "name" : "001", + "id" : "001", "data" : [ [ "Perl", @@ -39,7 +17,7 @@ 12 ] ], - "id" : "001" + "name" : "001" }, { "data" : [ @@ -60,7 +38,7 @@ "name" : "002" }, { - "id" : "003", + "name" : "003", "data" : [ [ "Perl", @@ -75,7 +53,7 @@ 9 ] ], - "name" : "003" + "id" : "003" }, { "name" : "004", @@ -114,7 +92,6 @@ "name" : "005" }, { - "id" : "006", "data" : [ [ "Perl", @@ -129,10 +106,11 @@ 7 ] ], + "id" : "006", "name" : "006" }, { - "id" : "007", + "name" : "007", "data" : [ [ "Perl", @@ -147,9 +125,10 @@ 10 ] ], - "name" : "007" + "id" : "007" }, { + "id" : "008", "data" : [ [ "Perl", @@ -164,11 +143,9 @@ 12 ] ], - "name" : "008", - "id" : "008" + "name" : "008" }, { - "id" : "009", "data" : [ [ "Perl", @@ -183,10 +160,10 @@ 13 ] ], - "name" : "009" + "name" : "009", + "id" : "009" }, { - "name" : "010", "data" : [ [ "Perl", @@ -201,9 +178,11 @@ 11 ] ], + "name" : "010", "id" : "010" }, { + "name" : "011", "data" : [ [ "Perl", @@ -218,8 +197,7 @@ 10 ] ], - "id" : "011", - "name" : "011" + "id" : "011" }, { "data" : [ @@ -258,7 +236,6 @@ "id" : "013" }, { - "id" : "014", "data" : [ [ "Perl", @@ -273,9 +250,11 @@ 15 ] ], - "name" : "014" + "name" : "014", + "id" : "014" }, { + "id" : "015", "data" : [ [ "Perl", @@ -290,7 +269,6 @@ 15 ] ], - "id" : "015", "name" : "015" }, { @@ -330,6 +308,7 @@ "id" : "017" }, { + "id" : "018", "data" : [ [ "Perl", @@ -344,10 +323,10 @@ 14 ] ], - "id" : "018", "name" : "018" }, { + "name" : "019", "data" : [ [ "Perl", @@ -362,11 +341,10 @@ 13 ] ], - "name" : "019", "id" : "019" }, { - "name" : "020", + "id" : "020", "data" : [ [ "Perl", @@ -381,10 +359,10 @@ 13 ] ], - "id" : "020" + "name" : "020" }, { - "name" : "021", + "id" : "021", "data" : [ [ "Perl", @@ -399,7 +377,7 @@ 10 ] ], - "id" : "021" + "name" : "021" }, { "data" : [ @@ -456,6 +434,7 @@ "id" : "024" }, { + "name" : "025", "data" : [ [ "Perl", @@ -470,10 +449,10 @@ 12 ] ], - "id" : "025", - "name" : "025" + "id" : "025" }, { + "id" : "026", "data" : [ [ "Perl", @@ -488,10 +467,10 @@ 10 ] ], - "id" : "026", "name" : "026" }, { + "id" : "027", "data" : [ [ "Perl", @@ -506,10 +485,10 @@ 9 ] ], - "id" : "027", "name" : "027" }, { + "id" : "028", "data" : [ [ "Perl", @@ -524,11 +503,9 @@ 9 ] ], - "name" : "028", - "id" : "028" + "name" : "028" }, { - "id" : "029", "data" : [ |
