aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-056/athanasius/perl/ch-1.pl121
-rw-r--r--challenge-056/athanasius/perl/ch-2.pl178
-rw-r--r--challenge-056/athanasius/raku/ch-1.p691
-rw-r--r--challenge-056/markus-holzer/raku/ch-1.p615
-rw-r--r--challenge-056/markus-holzer/raku/ch-2.p625
-rw-r--r--stats/pwc-current.json365
-rw-r--r--stats/pwc-language-breakdown-summary.json66
-rw-r--r--stats/pwc-language-breakdown.json842
-rw-r--r--stats/pwc-leaders.json362
-rw-r--r--stats/pwc-summary-1-30.json44
-rw-r--r--stats/pwc-summary-121-150.json106
-rw-r--r--stats/pwc-summary-151-180.json44
-rw-r--r--stats/pwc-summary-31-60.json98
-rw-r--r--stats/pwc-summary-61-90.json52
-rw-r--r--stats/pwc-summary-91-120.json30
-rw-r--r--stats/pwc-summary.json354
16 files changed, 1591 insertions, 1202 deletions
diff --git a/challenge-056/athanasius/perl/ch-1.pl b/challenge-056/athanasius/perl/ch-1.pl
new file mode 100644
index 0000000000..548e8e9d10
--- /dev/null
+++ b/challenge-056/athanasius/perl/ch-1.pl
@@ -0,0 +1,121 @@
+#!perl
+
+################################################################################
+=comment
+
+Perl Weekly Challenge 056
+=========================
+
+Task #1
+-------
+*Diff-K*
+
+You are given an array *@N* of positive integers (sorted) and another non
+negative integer *k*.
+
+Write a script to find if there exists 2 indices *i* and *j* such that
+*A[i] - A[j] = k* and *i != j*.
+
+It should print the pairs of indices, if any such pairs exist.
+
+Example:
+
+ @N = (2, 7, 9)
+ $k = 2
+
+Output : 2,1
+
+=cut
+################################################################################
+
+#--------------------------------------#
+# Copyright © 2020 PerlMonk Athanasius #
+#--------------------------------------#
+
+use strict;
+use warnings;
+use Const::Fast;
+use Data::Util qw( is_integer );
+use Getopt::Long;
+
+const my $USAGE => "USAGE: perl $0 --k=<K> <L> <M> <N> ...\n" . ' ' x 20 .
+ "- where K is a non-negative integer\n" . ' ' x 20 .
+ " and L, M, N, ... are positive integers\n";
+
+#-------------------------------------------------------------------------------
+BEGIN
+#-------------------------------------------------------------------------------
+{
+ $| = 1;
+ print "\n";
+}
+
+#===============================================================================
+MAIN:
+#===============================================================================
+{
+ print "Challenge 056, Task #1: Diff-K (Perl)\n\n";
+
+ # 1. Get, validate, and print @N and K
+
+ my ($n, $k) = parse_command_line();
+
+ printf "\@N = (%s)\n K = %d\n\n", join(', ', @$n), $k;
+
+ # 2. Find all solutions
+
+ my @solutions;
+
+ for my $i (1 .. $#$n)
+ {
+ for my $j (0 .. $i - 1)
+ {
+ push @solutions, [$i, $j] if $n->[$i] - $n->[$j] == $k;
+ }
+ }
+
+ # 3. Output the solutions
+
+ my $solutions = scalar @solutions;
+
+ if ($solutions == 0)
+ {
+ print "No solutions found\n";
+ }
+ else
+ {
+ printf "Found %d solution%s: %s\n",
+ $solutions, $solutions == 1 ? '' : 's',
+ join ', ', map "($_->[0], $_->[1])", @solutions;
+ }
+}
+
+#-------------------------------------------------------------------------------
+sub parse_command_line
+#-------------------------------------------------------------------------------
+{
+ my $k;
+ GetOptions('k=i' => \$k) or error();
+ defined $k or error('K is missing on the command line');
+ $k >= 0 or error('K must be non-negative');
+
+ my @n = @ARGV;
+ scalar @n > 0 or error('The array is empty');
+
+ is_integer($_) && $_ > 0 or error("Invalid array value '$_'") for @n;
+
+ @n = sort { $a <=> $b } @n;
+
+ return (\@n, $k);
+}
+
+#-------------------------------------------------------------------------------
+sub error
+#-------------------------------------------------------------------------------
+{
+ my ($msg) = @_;
+
+ die defined $msg ? "ERROR: $msg\n$USAGE" : $USAGE;
+}
+
+################################################################################
diff --git a/challenge-056/athanasius/perl/ch-2.pl b/challenge-056/athanasius/perl/ch-2.pl
new file mode 100644
index 0000000000..d97f257f95
--- /dev/null
+++ b/challenge-056/athanasius/perl/ch-2.pl
@@ -0,0 +1,178 @@
+#!perl
+
+################################################################################
+=comment
+
+Perl Weekly Challenge 056
+=========================
+
+Task #2
+-------
+*Path Sum*
+
+You are given a binary tree and a sum, write a script to find if the tree has a
+path such that adding up all the values along the path equals the given sum.
+Only complete paths (from root to leaf node) may be considered for a sum.
+
+*Example*
+
+Given the below binary tree and sum = 22,
+
+ 5
+ / \
+ 4 8
+ / / \
+ 11 13 9
+ / \ \
+ 7 2 1
+
+For the given binary tree, the partial path sum *5 → 8 → 9 = 22* is *not* valid.
+
+The script should return the path *5 → 4 → 11 → 2* whose sum is *22*.
+
+=cut
+################################################################################
+
+#--------------------------------------#
+# Copyright © 2020 PerlMonk Athanasius #
+#--------------------------------------#
+
+#-------------------------------------------------------------------------------
+# Assumptions:
+#
+# (1) All tree values are positive numbers greater than zero.
+# This simplifies the search, because it means that searching a path can be
+# safely discontinued as soon as the path sum becomes >= the target sum.
+#
+# (2) If multiple solutions exist, only the first (via depth-first traversal) is
+# required.
+#-------------------------------------------------------------------------------
+
+use strict;
+use warnings;
+use Const::Fast;
+use Tree::Binary2;
+use constant DEBUG => 0;
+
+const my $SUM => 22;
+
+my @path;
+my $solution_found;
+
+#-------------------------------------------------------------------------------
+BEGIN
+#-------------------------------------------------------------------------------
+{
+ $| = 1;
+ print "\n";
+}
+
+#===============================================================================
+MAIN:
+#===============================================================================
+{
+ print "Challenge 056, Task #2: Path Sum (Perl)\n\n";
+
+ my $tree = populate_tree();
+
+ if (DEBUG)
+ {
+ # The example tree's mirror (i.e., all nodes reversed) is a better test
+ # of the algorithm because the invalid solution 5 -> 8 -> 9 is examined
+ # BEFORE the correct solution 5 -> 4 -> 11 -> 2
+
+ $tree->mirror;
+
+ printf "%s\n\n", join "\n",
+ @{ $tree->tree2string({ no_attributes => 1 }) };
+ }
+
+ find_path($tree, $SUM);
+
+ if ($solution_found)
+ {
+ printf "Found path: %s, whose sum is %d\n", join(' -> ', @path), $SUM;
+ }
+ else
+ {
+ print "No path found for sum $SUM\n";
+ }
+}
+
+#-------------------------------------------------------------------------------
+# See the Wikipedia article "Backtracking", section "Pseudocode"
+#
+sub find_path
+#-------------------------------------------------------------------------------
+{
+ my ($tree, $sum) = @_;
+
+ return if $solution_found;
+
+ my $root = $tree->{ _value };
+
+ push @path, $root;
+
+ if ($root > $sum)
+ {
+ pop @path;
+ return;
+ }
+
+ my $left = $tree->left;
+ my $right = $tree->right;
+
+ if ($root == $sum)
+ {
+ if (!$left && !$right) # Leaf node
+ {
+ $solution_found = 1;
+ }
+ else # Internal node
+ {
+ pop @path;
+ }
+
+ return;
+ }
+
+ find_path($left, $sum - $root) if $left; # Recursive calls
+ find_path($right, $sum - $root) if $right;
+
+ pop @path unless $solution_found;
+}
+
+#-------------------------------------------------------------------------------
+sub populate_tree
+#-------------------------------------------------------------------------------
+{
+ my $tree = Tree::Binary2->new( 5 );
+ my $left = Tree::Binary2->new( 4 );
+ my $right = Tree::Binary2->new( 8 );
+
+ $tree->left( $left );
+ $tree->right( $right );
+
+ $left = Tree::Binary2->new( 11 );
+ $tree->left->left( $left );
+
+ $left = Tree::Binary2->new( 7 );
+ $right = Tree::Binary2->new( 2 );
+
+ $tree->left->left->left( $left );
+ $tree->left->left->right( $right );
+
+ $left = Tree::Binary2->new( 13 );
+ $right = Tree::Binary2->new( 9 );
+
+ $tree->right->left( $left );
+ $tree->right->right( $right );
+
+ $right = Tree::Binary2->new( 1 );
+
+ $tree->right->right->right( $right );
+
+ return $tree;
+}
+
+################################################################################
diff --git a/challenge-056/athanasius/raku/ch-1.p6 b/challenge-056/athanasius/raku/ch-1.p6
new file mode 100644
index 0000000000..ce51271f9f
--- /dev/null
+++ b/challenge-056/athanasius/raku/ch-1.p6
@@ -0,0 +1,91 @@
+use v6d;
+
+################################################################################
+=begin comment
+
+Perl Weekly Challenge 056
+=========================
+
+Task #1
+-------
+*Diff-K*
+
+You are given an array *@N* of positive integers (sorted) and another non
+negative integer *k*.
+
+Write a script to find if there exists 2 indices *i* and *j* such that
+*A[i] - A[j] = k* and *i != j*.
+
+It should print the pairs of indices, if any such pairs exist.
+
+Example:
+
+ @N = (2, 7, 9)
+ $k = 2
+
+Output : 2,1
+
+=end comment
+################################################################################
+
+#--------------------------------------#
+# Copyright © 2020 PerlMonk Athanasius #
+#--------------------------------------#
+
+#-------------------------------------------------------------------------------
+BEGIN ''.put;
+#-------------------------------------------------------------------------------
+
+#===============================================================================
+sub MAIN
+(
+ UInt:D :$K, #= K is a non-negative integer
+ *@N, #= @N is an array of positive integers
+)
+#===============================================================================
+{
+ "Challenge 056, Task #1: Diff-K (Raku)\n".put;
+
+ # 1. Validate and print @N and K
+
+ @N.elems > 0 or die 'ERROR: The array is empty';
+
+ for @N
+ {
+ my UInt $entry = $_;
+ $entry > 0 or die "ERROR: Invalid array entry '$_'";
+ }
+
+ @N = @N.sort;
+
+ "\@N = (%s)\n K = %d\n\n".printf: @N.join(', '), $K;
+
+ # 2. Find all solutions
+
+ my @solutions;
+
+ for 1 .. @N.elems - 1 -> UInt $i
+ {
+ for 0 .. $i - 1 -> UInt $j
+ {
+ @solutions.push: [$i, $j] if @N[$i] - @N[$j] == $K;
+ }
+ }
+
+ # 3. Output the solutions
+
+ my UInt $solutions = @solutions.elems;
+
+ if $solutions == 0
+ {
+ "No solutions found".put;
+ }
+ else
+ {
+ printf "Found %d solution%s: %s\n",
+ $solutions, $solutions == 1 ?? '' !! 's',
+ @solutions.map( { "($_[0], $_[1])" } ).join: ', ';
+ }
+}
+
+###############################################################################
diff --git a/challenge-056/markus-holzer/raku/ch-1.p6 b/challenge-056/markus-holzer/raku/ch-1.p6
index 43e9525eb0..e9c3c4f06d 100644
--- a/challenge-056/markus-holzer/raku/ch-1.p6
+++ b/challenge-056/markus-holzer/raku/ch-1.p6
@@ -1,19 +1,10 @@
-sub USAGE() {
- print Q:c:to/EOH/;
- ch-2.p6 <k> <N1> <N2> <N3> ... <Nn>
-
- Example:
- ch-1.p6 2 2 4 6 7 9
- EOH
-}
-
-sub MAIN( UInt $k, *@N where *.elems > 1 )
+sub MAIN( UInt $k, *@N )
{
- CATCH { USAGE() and exit -1; }
+ CATCH { say $*USAGE() and exit -1; }
.say for ( @N>>.UInt )
.pairs
- .combinations( 2 )
+ .rotor( 2 => -1 )
.grep({ .[1].value - .[0].value == $k })
.map( *>>.key );
}
diff --git a/challenge-056/markus-holzer/raku/ch-2.p6 b/challenge-056/markus-holzer/raku/ch-2.p6
index 513a6d29ac..2665eb2125 100644
--- a/challenge-056/markus-holzer/raku/ch-2.p6
+++ b/challenge-056/markus-holzer/raku/ch-2.p6
@@ -20,23 +20,12 @@ my %tree =
.join('→').say
for find-path-sum( %tree, 22 );
-multi sub find-path-sum( %tree, $n )
-{
- gather find-path-sum( %tree, $n, [] );
-}
+multi sub find-path-sum( Hash:D $tree, Int $n ) {
+ gather find-path-sum( $tree, $n, [] ); }
-multi sub find-path-sum( $tree, $n, $path )
-{
- for $tree.keys -> $k
- {
- my $p = $path.clone.push( $k );
+multi sub find-path-sum( Hash:D $tree, Int $n, Array $path ) {
+ find-path-sum( $tree{ $_ }, $n, $path.clone.push($_) )
+ for $tree.keys; }
- if my $t = $tree{ $k }
- {
- find-path-sum( $t, $n, $p );
- next;
- }
-
- take $p if $p.sum == $n;
- }
-} \ No newline at end of file
+multi sub find-path-sum( Any, Int $n, Array $path ) {
+ take $path if $path.sum == $n; } \ No newline at end of file
diff --git a/stats/pwc-current.json b/stats/pwc-current.json
index 325b3ebd68..87a4b80dbe 100644
--- a/stats/pwc-current.json
+++ b/stats/pwc-current.json
@@ -1,15 +1,147 @@
{
+ "xAxis" : {
+ "type" : "category"
+ },
+ "subtitle" : {
+ "text" : "[Champions: 23] Last updated at 2020-04-19 13:36:41 GMT"
+ },
+ "series" : [
+ {
+ "data" : [
+ {
+ "drilldown" : "Alicia Bielsa",
+ "y" : 2,
+ "name" : "Alicia Bielsa"
+ },
+ {
+ "drilldown" : "Andrezgz",
+ "y" : 2,
+ "name" : "Andrezgz"
+ },
+ {
+ "drilldown" : "Arne Sommer",
+ "y" : 3,
+ "name" : "Arne Sommer"
+ },
+ {
+ "name" : "Athanasius",
+ "drilldown" : "Athanasius",
+ "y" : 3
+ },
+ {
+ "y" : 1,
+ "drilldown" : "Cheok-Yin Fung",
+ "name" : "Cheok-Yin Fung"
+ },
+ {
+ "y" : 1,
+ "drilldown" : "Cristina Heredia",
+ "name" : "Cristina Heredia"
+ },
+ {
+ "drilldown" : "Dave Jacoby",
+ "y" : 3,
+ "name" : "Dave Jacoby"
+ },
+ {
+ "y" : 2,
+ "drilldown" : "E. Choroba",
+ "name" : "E. Choroba"
+ },
+ {
+ "name" : "Jared Martin",
+ "drilldown" : "Jared Martin",
+ "y" : 3
+ },
+ {
+ "name" : "Javier Luque",
+ "y" : 5,
+ "drilldown" : "Javier Luque"
+ },
+ {
+ "y" : 2,
+ "drilldown" : "Kevin Colyer",
+ "name" : "Kevin Colyer"
+ },
+ {
+ "name" : "Laurent Rosenfeld",
+ "y" : 5,
+ "drilldown" : "Laurent Rosenfeld"
+ },
+ {
+ "name" : "Lubos Kolouch",
+ "y" : 2,
+ "drilldown" : "Lubos Kolouch"
+ },
+ {
+ "name" : "Luca Ferrari",
+ "y" : 4,
+ "drilldown" : "Luca Ferrari"
+ },
+ {
+ "drilldown" : "Mark Anderson",
+ "y" : 4,
+ "name" : "Mark Anderson"
+ },
+ {
+ "name" : "Markus Holzer",
+ "y" : 2,
+ "drilldown" : "Markus Holzer"
+ },
+ {
+ "y" : 3,
+ "drilldown" : "Matthew Somerville",
+ "name" : "Matthew Somerville"
+ },
+ {
+ "name" : "Mohammad S Anwar",
+ "drilldown" : "Mohammad S Anwar",
+ "y" : 4
+ },
+ {
+ "drilldown" : "Roger Bell West",
+ "y" : 3,
+ "name" : "Roger Bell West"
+ },
+ {
+ "name" : "Shahed Nooshmand",
+ "y" : 3,
+ "drilldown" : "Shahed Nooshmand"
+ },
+ {
+ "name" : "Simon Proctor",
+ "drilldown" : "Simon Proctor",
+ "y" : 2
+ },
+ {
+ "name" : "Wanderdoc",
+ "y" : 1,
+ "drilldown" : "Wanderdoc"
+ },
+ {
+ "name" : "Yet Ebreo",
+ "y" : 2,
+ "drilldown" : "Yet Ebreo"
+ }
+ ],
+ "colorByPoint" : 1,
+ "name" : "Perl Weekly Challenge - 056"
+ }
+ ],
+ "title" : {
+ "text" : "Perl Weekly Challenge - 056"
+ },
"drilldown" : {
"series" : [
{
+ "id" : "Alicia Bielsa",
+ "name" : "Alicia Bielsa",
"data" : [
[
"Perl",
2
]
- ],
- "name" : "Alicia Bielsa",
- "id" : "Alicia Bielsa"
+ ]
},
{
"id" : "Andrezgz",
@@ -22,6 +154,7 @@
]
},
{
+ "id" : "Arne Sommer",
"name" : "Arne Sommer",
"data" : [
[
@@ -32,22 +165,25 @@
"Blog",
1
]
- ],
- "id" : "Arne Sommer"
+ ]
},
{
- "name" : "Cheok-Yin Fung",
"data" : [
[
"Perl",
+ 2
+ ],
+ [
+ "Raku",
1
]
],
- "id" : "Cheok-Yin Fung"
+ "id" : "Athanasius",
+ "name" : "Athanasius"
},
{
- "id" : "Cristina Heredia",
- "name" : "Cristina Heredia",
+ "name" : "Cheok-Yin Fung",
+ "id" : "Cheok-Yin Fung",
"data" : [
[
"Perl",
@@ -56,8 +192,16 @@
]
},
{
- "id" : "Dave Jacoby",
- "name" : "Dave Jacoby",
+ "data" : [
+ [
+ "Perl",
+ 1
+ ]
+ ],
+ "name" : "Cristina Heredia",
+ "id" : "Cristina Heredia"
+ },
+ {
"data" : [
[
"Perl",
@@ -67,7 +211,9 @@
"Blog",
1
]
- ]
+ ],
+ "name" : "Dave Jacoby",
+ "id" : "Dave Jacoby"
},
{
"id" : "E. Choroba",
@@ -80,7 +226,6 @@
]
},
{
- "id" : "Jared Martin",
"data" : [
[
"Perl",
@@ -91,10 +236,10 @@
1
]
],
+ "id" : "Jared Martin",
"name" : "Jared Martin"
},
{
- "name" : "Javier Luque",
"data" : [
[
"Perl",
@@ -109,21 +254,20 @@
1
]
],
+ "name" : "Javier Luque",
"id" : "Javier Luque"
},
{
- "id" : "Kevin Colyer",
"data" : [
[
"Raku",
2
]
],
- "name" : "Kevin Colyer"
+ "name" : "Kevin Colyer",
+ "id" : "Kevin Colyer"
},
{
- "id" : "Laurent Rosenfeld",
- "name" : "Laurent Rosenfeld",
"data" : [
[
"Perl",
@@ -137,19 +281,22 @@
"Blog",
1
]
- ]
+ ],
+ "name" : "Laurent Rosenfeld",
+ "id" : "Laurent Rosenfeld"
},
{
"id" : "Lubos Kolouch",
+ "name" : "Lubos Kolouch",
"data" : [
[
"Perl",
2
]
- ],
- "name" : "Lubos Kolouch"
+ ]
},
{
+ "id" : "Luca Ferrari",
"name" : "Luca Ferrari",
"data" : [
[
@@ -160,8 +307,7 @@
"Blog",
2
]
- ],
- "id" : "Luca Ferrari"
+ ]
},
{
"id" : "Mark Anderson",
@@ -188,6 +334,7 @@
"id" : "Markus Holzer"
},
{
+ "id" : "Matthew Somerville",
"name" : "Matthew Somerville",
"data" : [
[
@@ -198,8 +345,7 @@
"Blog",
1
]
- ],
- "id" : "Matthew Somerville"
+ ]
},
{
"data" : [
@@ -245,186 +391,59 @@
},
{
"name" : "Simon Proctor",
+ "id" : "Simon Proctor",
"data" : [
[
"Raku",
2
]
- ],
- "id" : "Simon Proctor"
+ ]
},
{
"id" : "Wanderdoc",
+ "name" : "Wanderdoc",
"data" : [
[
"Perl",
1
]
- ],
- "name" : "Wanderdoc"
+ ]
},
{
+ "name" : "Yet Ebreo",
"id" : "Yet Ebreo",
"data" : [
[
"Perl",
2
]
- ],
- "name" : "Yet Ebreo"
+ ]
}
]
},
- "series" : [
- {
- "name" : "Perl Weekly Challenge - 056",
- "data" : [
- {
- "name" : "Alicia Bielsa",
- "y" : 2,
- "drilldown" : "Alicia Bielsa"
- },
- {
- "y" : 2,
- "drilldown" : "Andrezgz",
- "name" : "Andrezgz"
- },
- {
- "y" : 3,
- "drilldown" : "Arne Sommer",
- "name" : "Arne Sommer"
- },
- {
- "y" : 1,
- "drilldown" : "Cheok-Yin Fung",
- "name" : "Cheok-Yin Fung"
- },
- {
- "name" : "Cristina Heredia",
- "drilldown" : "Cristina Heredia",
- "y" : 1
- },
- {
- "name" : "Dave Jacoby",
- "y" : 3,
- "drilldown" : "Dave Jacoby"
- },
- {
- "y" : 2,
- "drilldown" : "E. Choroba",
- "name" : "E. Choroba"
- },
- {
- "name" : "Jared Martin",
- "drilldown" : "Jared Martin",
- "y" : 3
- },
- {
- "name" : "Javier Luque",
- "y" : 5,
- "drilldown" : "Javier Luque"
- },
- {
- "name" : "Kevin Colyer",
- "y" : 2,
- "drilldown" : "Kevin Colyer"
- },
- {
- "name" : "Laurent Rosenfeld",
- "y" : 5,
- "drilldown" : "Laurent Rosenfeld"
- },
- {
- "name" : "Lubos Kolouch",
- "drilldown" : "Lubos Kolouch",
- "y" : 2
- },
- {
- "y" : 4,
- "drilldown" : "Luca Ferrari",
- "name" : "Luca Ferrari"
- },
- {
- "drilldown" : "Mark Anderson",
- "y" : 4,
- "name" : "Mark Anderson"
- },
- {
- "drilldown" : "Markus Holzer",
- "y" : 2,
- "name" : "Markus Holzer"
- },
- {
- "drilldown" : "Matthew Somerville",
- "y" : 3,
- "name" : "Matthew Somerville"
- },
- {
- "y" : 4,
- "drilldown" : "Mohammad S Anwar",
- "name" : "Mohammad S Anwar"
- },
- {
- "name" : "Roger Bell West",
- "drilldown" : "Roger Bell West",
- "y" : 3
- },
- {
- "name" : "Shahed Nooshmand",
- "y" : 3,
- "drilldown" : "Shahed Nooshmand"
- },
- {
- "name" : "Simon Proctor",
- "drilldown" : "Simon Proctor",
- "y" : 2
- },
- {
- "drilldown" : "Wanderdoc",
- "y" : 1,
- "name" : "Wanderdoc"
- },
- {
- "drilldown" : "Yet Ebreo",
- "y" : 2,
- "name" : "Yet Ebreo"
- }
- ],
- "colorByPoint" : 1
+ "legend" : {
+ "enabled" : 0
+ },
+ "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/>"
+ },
+ "chart" : {
+ "type" : "column"
},
"plotOptions" : {
"series" : {
"borderWidth" : 0,
"dataLabels" : {
- "enabled" : 1,
- "format" : "{point.y}"
+ "format" : "{point.y}",
+ "enabled" : 1
}
}
},
- "subtitle" : {
- "text" : "[Champions: 22] Last updated at 2020-04-19 11:42:29 GMT"
- },
- "title" : {
- "text" : "Perl Weekly Challenge - 056"
- },
- "xAxis" : {
- "type" : "category"
- },
- "chart" : {
- "type" : "column"
- },
- "yAxis" : {
- "title" : {
- "text" : "Total Solutions"
- }
- },
- "legend" : {
- "enabled" : 0
+ "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-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json
index 3b1e89ba68..a97d0272f1 100644
--- a/stats/pwc-language-breakdown-summary.json
+++ b/stats/pwc-language-breakdown-summary.json
@@ -1,31 +1,10 @@
{
- "legend" : {
- "enabled" : "false"
- },
- "chart" : {
- "type" : "column"
- },
- "yAxis" : {
- "title" : {
- "text" : null
- },
- "min" : 0
+ "tooltip" : {
+ "pointFormat" : "<b>{point.y:.0f}</b>"
},
"title" : {
"text" : "Perl Weekly Challenge Contributions [2019 - 2020]"
},
- "xAxis" : {
- "labels" : {
- "style" : {
- "fontSize" : "13px",
- "fontFamily" : "Verdana, sans-serif"
- }
- },
- "type" : "category"
- },
- "subtitle" : {
- "text" : "Last updated at 2020-04-19 11:42:29 GMT"
- },
"series" : [
{
"name" : "Contributions",
@@ -36,28 +15,49 @@
],
[
"Perl",
- 2370
+ 2372
],
[
"Raku",
- 1485
+ 1486
]
],
"dataLabels" : {
- "y" : 10,
- "rotation" : -90,
- "align" : "right",
- "color" : "#FFFFFF",
- "format" : "{point.y:.0f}",
"enabled" : "true",
"style" : {
"fontSize" : "13px",
"fontFamily" : "Verdana, sans-serif"
- }
+ },
+ "align" : "right",
+