From 6d10cc601ccd2de4c006258fc4be7e62da3a5b20 Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Tue, 18 Jul 2023 00:36:10 +0100 Subject: - Added solutions by Robert DiCicco. - Added solutions by Ulrich Rieke. - Added solutions by Laurent Rosenfeld. - Added solutions by Mark Anderson. - Added solutions by W. Luis Mochan. - Added solutions by Packy Anderson. - Added solutions by PokGoPun. - Added solutions by David Ferrone. - Added solutions by Niels van Dijke. - Added solutions by Luca Ferrari. - Added solutions by Bob Lied. - Added solutions by Steven Wilson. - Added solutions by Jaldhar H. Vyas. - Added solutions by Arne Sommer. --- challenge-226/eric-cheung/python/ch-1.py | 12 + challenge-226/eric-cheung/python/ch-2.py | 15 + challenge-226/laurent-rosenfeld/blog.txt | 1 + challenge-226/laurent-rosenfeld/perl/ch-1.pl | 19 + challenge-226/laurent-rosenfeld/raku/ch-1.raku | 12 + challenge-226/packy-anderson/perl/ch-1.pl | 20 + challenge-226/packy-anderson/perl/ch-2.pl | 37 + challenge-226/packy-anderson/perl/task-1.pl | 20 - challenge-226/packy-anderson/perl/task-2.pl | 37 - challenge-226/packy-anderson/raku/ch-1.raku | 18 + challenge-226/packy-anderson/raku/ch-2.raku | 34 + challenge-226/packy-anderson/raku/task-1.raku | 18 - challenge-226/packy-anderson/raku/task-2.raku | 34 - challenge-226/perlboy1967/perl/ch-1.pl | 34 + challenge-226/perlboy1967/perl/ch-2.pl | 44 + challenge-226/perlboy1967/perl/ch1.pl | 34 - challenge-226/perlboy1967/perl/ch2.pl | 44 - challenge-226/robert-dicicco/perl/ch-1.pl | 50 + challenge-226/robert-dicicco/raku/ch-1.raku | 48 + challenge-226/robert-dicicco/ruby/ch-1.rb | 49 + challenge-226/steven-wilson/perl/ch-01.pl | 24 - challenge-226/steven-wilson/perl/ch-1.pl | 24 + challenge-226/ulrich-rieke/haskell/ch-1.hs | 15 + challenge-226/ulrich-rieke/haskell/ch-2.hs | 20 + challenge-226/ulrich-rieke/perl/ch-1.pl | 20 + challenge-226/ulrich-rieke/perl/ch-2.pl | 27 + challenge-226/ulrich-rieke/raku/ch-1.raku | 14 + challenge-226/ulrich-rieke/raku/ch-2.raku | 20 + challenge-226/ulrich-rieke/rust/ch-1.rs | 25 + challenge-226/ulrich-rieke/rust/ch-2.rs | 23 + members.json | 1 + stats/pwc-challenge-225.json | 695 ++ stats/pwc-current.json | 564 +- stats/pwc-language-breakdown-summary.json | 80 +- stats/pwc-language-breakdown.json | 8909 ++++++++++++------------ stats/pwc-leaders.json | 472 +- stats/pwc-summary-1-30.json | 130 +- stats/pwc-summary-121-150.json | 108 +- stats/pwc-summary-151-180.json | 110 +- stats/pwc-summary-181-210.json | 116 +- stats/pwc-summary-211-240.json | 118 +- stats/pwc-summary-241-270.json | 48 +- stats/pwc-summary-271-300.json | 82 +- stats/pwc-summary-31-60.json | 102 +- stats/pwc-summary-61-90.json | 114 +- stats/pwc-summary-91-120.json | 40 +- stats/pwc-summary.json | 1816 ++--- 47 files changed, 7491 insertions(+), 6806 deletions(-) create mode 100755 challenge-226/eric-cheung/python/ch-1.py create mode 100755 challenge-226/eric-cheung/python/ch-2.py create mode 100644 challenge-226/laurent-rosenfeld/blog.txt create mode 100644 challenge-226/laurent-rosenfeld/perl/ch-1.pl create mode 100644 challenge-226/laurent-rosenfeld/raku/ch-1.raku create mode 100755 challenge-226/packy-anderson/perl/ch-1.pl create mode 100755 challenge-226/packy-anderson/perl/ch-2.pl delete mode 100755 challenge-226/packy-anderson/perl/task-1.pl delete mode 100755 challenge-226/packy-anderson/perl/task-2.pl create mode 100755 challenge-226/packy-anderson/raku/ch-1.raku create mode 100755 challenge-226/packy-anderson/raku/ch-2.raku delete mode 100755 challenge-226/packy-anderson/raku/task-1.raku delete mode 100755 challenge-226/packy-anderson/raku/task-2.raku create mode 100755 challenge-226/perlboy1967/perl/ch-1.pl create mode 100755 challenge-226/perlboy1967/perl/ch-2.pl delete mode 100755 challenge-226/perlboy1967/perl/ch1.pl delete mode 100755 challenge-226/perlboy1967/perl/ch2.pl create mode 100644 challenge-226/robert-dicicco/perl/ch-1.pl create mode 100644 challenge-226/robert-dicicco/raku/ch-1.raku create mode 100644 challenge-226/robert-dicicco/ruby/ch-1.rb delete mode 100644 challenge-226/steven-wilson/perl/ch-01.pl create mode 100644 challenge-226/steven-wilson/perl/ch-1.pl create mode 100755 challenge-226/ulrich-rieke/haskell/ch-1.hs create mode 100755 challenge-226/ulrich-rieke/haskell/ch-2.hs create mode 100755 challenge-226/ulrich-rieke/perl/ch-1.pl create mode 100755 challenge-226/ulrich-rieke/perl/ch-2.pl create mode 100755 challenge-226/ulrich-rieke/raku/ch-1.raku create mode 100755 challenge-226/ulrich-rieke/raku/ch-2.raku create mode 100755 challenge-226/ulrich-rieke/rust/ch-1.rs create mode 100755 challenge-226/ulrich-rieke/rust/ch-2.rs create mode 100644 stats/pwc-challenge-225.json diff --git a/challenge-226/eric-cheung/python/ch-1.py b/challenge-226/eric-cheung/python/ch-1.py new file mode 100755 index 0000000000..bd083aa7f7 --- /dev/null +++ b/challenge-226/eric-cheung/python/ch-1.py @@ -0,0 +1,12 @@ + +## Example 1 +## strInput = "lacelengh" +## arrIndices = [3, 2, 0, 5, 4, 8, 6, 7, 1] + +## Example 2 +strInput = "rulepark" +arrIndices = [4, 7, 3, 1, 0, 5, 2, 6] + +strOutput = "".join([strInput[arrIndices.index(nLoop)] for nLoop in range(len(strInput))]) + +print (strOutput) diff --git a/challenge-226/eric-cheung/python/ch-2.py b/challenge-226/eric-cheung/python/ch-2.py new file mode 100755 index 0000000000..2550e435d0 --- /dev/null +++ b/challenge-226/eric-cheung/python/ch-2.py @@ -0,0 +1,15 @@ + +import numpy as np + +## arrInput = np.array([1, 5, 0, 3, 5]) ## Example 1 +## arrInput = np.array([0]) ## Example 2 +arrInput = np.array([2, 1, 4, 0, 3]) ## Example 3 + +nCount = 0 + +while np.count_nonzero(arrInput) > 0: + nSubstract = min([nLoop for nLoop in arrInput if nLoop > 0]) + arrInput = [nLoop - nSubstract if nLoop > 0 else 0 for nLoop in arrInput] + nCount = nCount + 1 + +print (nCount) diff --git a/challenge-226/laurent-rosenfeld/blog.txt b/challenge-226/laurent-rosenfeld/blog.txt new file mode 100644 index 0000000000..10004c21cc --- /dev/null +++ b/challenge-226/laurent-rosenfeld/blog.txt @@ -0,0 +1 @@ +https://blogs.perl.org/users/laurent_r/2023/07/perl-weekly-challenge-226-shuffle-string.html diff --git a/challenge-226/laurent-rosenfeld/perl/ch-1.pl b/challenge-226/laurent-rosenfeld/perl/ch-1.pl new file mode 100644 index 0000000000..7ead27d4c1 --- /dev/null +++ b/challenge-226/laurent-rosenfeld/perl/ch-1.pl @@ -0,0 +1,19 @@ +use strict; +use warnings; +use feature 'say'; + +sub shuffle_string { + my ($string, $idx_ref) = @_; + my @indices = @$idx_ref; + my @index; + @index[$indices[$_]]= $_ for 0..$#indices; + return join "", (split //, $string)[@index]; +} + +for my $test (['lacelengh', [3,2,0,5,4,8,6,7,1]], + ['rulepark', [4,7,3,1,0,5,2,6]]) { + printf "%-10s - %-18s => ", + $test->[0], "@{$test->[1]}"; + say shuffle_string $test->[0], $test->[1]; + +} diff --git a/challenge-226/laurent-rosenfeld/raku/ch-1.raku b/challenge-226/laurent-rosenfeld/raku/ch-1.raku new file mode 100644 index 0000000000..e2b98d7373 --- /dev/null +++ b/challenge-226/laurent-rosenfeld/raku/ch-1.raku @@ -0,0 +1,12 @@ +sub shuffle-string ($string, @indice) { + my @index; + @index[@indice[$_]]= $_ for 0..@indice.end; + # say @index; + return ($string.comb)[@index].join(""); +} + +for ('lacelengh', (3,2,0,5,4,8,6,7,1)), + ('rulepark', (4,7,3,1,0,5,2,6)) -> @test { + printf "%-10s - %-20s => ", @test[0], "@test[1]"; + say shuffle-string @test[0], @test[1]; +} diff --git a/challenge-226/packy-anderson/perl/ch-1.pl b/challenge-226/packy-anderson/perl/ch-1.pl new file mode 100755 index 0000000000..789323434c --- /dev/null +++ b/challenge-226/packy-anderson/perl/ch-1.pl @@ -0,0 +1,20 @@ +#!/usr/bin/env perl +use v5.36; + +sub shuffle_string { + my($string, $indices) = @_; + my @chars = split //, $string; # split input string into characters + my @result; + foreach my $index ( @$indices ) { + my $char = shift @chars; # get the next character + $result[$index] = $char; # put the character at that index in the result + } + say "Input: \$string = '$string', \@indices = (" . join(',', @$indices) . ")"; + say "Output: '" . join(q{}, @result) . "'"; +} + +say "Task 1: Shuffle String"; +say "\nExample 1"; +shuffle_string('lacelengh', [3,2,0,5,4,8,6,7,1]); +say "\nExample 2"; +shuffle_string('rulepark', [4,7,3,1,0,5,2,6]); diff --git a/challenge-226/packy-anderson/perl/ch-2.pl b/challenge-226/packy-anderson/perl/ch-2.pl new file mode 100755 index 0000000000..87271cf504 --- /dev/null +++ b/challenge-226/packy-anderson/perl/ch-2.pl @@ -0,0 +1,37 @@ +#!/usr/bin/env perl +use v5.36; + +use List::Util qw( min ); + +sub min_positive { + my @ints = grep { $_ > 0 } @_; # only consider positive numbers + return min @ints; # find smallest, undef if empty list +} + +sub zero_array { + my @ints = @_; + say "Input: \@ints = (" . join(', ', @ints) . ")"; + my @operations; + while ( my $min = min_positive(@ints) ) { + my $op_num = scalar(@operations) + 1; + foreach my $int ( @ints ) { + $int -= $min if $int > 0; + } + push @operations, "operation $op_num: pick $min => (" . join(', ', @ints) . ")"; + } + say "Output: " . scalar(@operations); + if (@operations) { + say ""; + say join "\n", @operations; + } +} + +say "Task 2: Zero Array"; +say "\nExample 1"; +zero_array(1, 5, 0, 3, 5); + +say "\nExample 2"; +zero_array(0); + +say "\nExample 3"; +zero_array(2, 1, 4, 0, 3); diff --git a/challenge-226/packy-anderson/perl/task-1.pl b/challenge-226/packy-anderson/perl/task-1.pl deleted file mode 100755 index 789323434c..0000000000 --- a/challenge-226/packy-anderson/perl/task-1.pl +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env perl -use v5.36; - -sub shuffle_string { - my($string, $indices) = @_; - my @chars = split //, $string; # split input string into characters - my @result; - foreach my $index ( @$indices ) { - my $char = shift @chars; # get the next character - $result[$index] = $char; # put the character at that index in the result - } - say "Input: \$string = '$string', \@indices = (" . join(',', @$indices) . ")"; - say "Output: '" . join(q{}, @result) . "'"; -} - -say "Task 1: Shuffle String"; -say "\nExample 1"; -shuffle_string('lacelengh', [3,2,0,5,4,8,6,7,1]); -say "\nExample 2"; -shuffle_string('rulepark', [4,7,3,1,0,5,2,6]); diff --git a/challenge-226/packy-anderson/perl/task-2.pl b/challenge-226/packy-anderson/perl/task-2.pl deleted file mode 100755 index 87271cf504..0000000000 --- a/challenge-226/packy-anderson/perl/task-2.pl +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env perl -use v5.36; - -use List::Util qw( min ); - -sub min_positive { - my @ints = grep { $_ > 0 } @_; # only consider positive numbers - return min @ints; # find smallest, undef if empty list -} - -sub zero_array { - my @ints = @_; - say "Input: \@ints = (" . join(', ', @ints) . ")"; - my @operations; - while ( my $min = min_positive(@ints) ) { - my $op_num = scalar(@operations) + 1; - foreach my $int ( @ints ) { - $int -= $min if $int > 0; - } - push @operations, "operation $op_num: pick $min => (" . join(', ', @ints) . ")"; - } - say "Output: " . scalar(@operations); - if (@operations) { - say ""; - say join "\n", @operations; - } -} - -say "Task 2: Zero Array"; -say "\nExample 1"; -zero_array(1, 5, 0, 3, 5); - -say "\nExample 2"; -zero_array(0); - -say "\nExample 3"; -zero_array(2, 1, 4, 0, 3); diff --git a/challenge-226/packy-anderson/raku/ch-1.raku b/challenge-226/packy-anderson/raku/ch-1.raku new file mode 100755 index 0000000000..8835f8a582 --- /dev/null +++ b/challenge-226/packy-anderson/raku/ch-1.raku @@ -0,0 +1,18 @@ +#!/usr/bin/env raku + +sub shuffle_string ($string, @indices) { + my @chars = $string.split("", :skip-empty); + my @result; + for @indices -> $index { + my $char = shift @chars; # get the next character + @result[$index] = $char; # put the character at that index in the result + } + say "Input: \$string = '$string', \@indices = (" ~ @indices.join(',') ~ ")"; + say "Output: '" ~ @result.join('') ~ "'"; +} + +say "Task 1: Shuffle String"; +say "\nExample 1"; +shuffle_string('lacelengh', (3,2,0,5,4,8,6,7,1)); +say "\nExample 2"; +shuffle_string('rulepark', (4,7,3,1,0,5,2,6)); diff --git a/challenge-226/packy-anderson/raku/ch-2.raku b/challenge-226/packy-anderson/raku/ch-2.raku new file mode 100755 index 0000000000..1065c220c0 --- /dev/null +++ b/challenge-226/packy-anderson/raku/ch-2.raku @@ -0,0 +1,34 @@ +#!/usr/bin/env raku + +sub min_positive (@ints) { + my @positive = @ints.grep({ $_ > 0 }); # only consider positive numbers + return unless @positive.elems; # return early if no positive nums + return @positive.reduce(&min); # find smallest +} + +sub zero_array (@ints) { + say "Input: \@ints = (" ~ @ints.join(', ') ~ ")"; + my @operations; + while ( my $min = min_positive(@ints) ) { + my $op_num = @operations.elems + 1; + for @ints <-> $int { + $int -= $min if $int > 0; + } + @operations.push("operation $op_num: pick $min => (" ~ @ints.join(', ') ~ ")"); + } + say "Output: " ~ @operations.elems; + if (@operations) { + say ""; + say @operations.join("\n"); + } +} + +say "Task 2: Zero Array"; +say "\nExample 1"; +zero_array([1, 5, 0, 3, 5]); + +say "\nExample 2"; +zero_array([0]); + +say "\nExample 3"; +zero_array([2, 1, 4, 0, 3]); diff --git a/challenge-226/packy-anderson/raku/task-1.raku b/challenge-226/packy-anderson/raku/task-1.raku deleted file mode 100755 index 8835f8a582..0000000000 --- a/challenge-226/packy-anderson/raku/task-1.raku +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env raku - -sub shuffle_string ($string, @indices) { - my @chars = $string.split("", :skip-empty); - my @result; - for @indices -> $index { - my $char = shift @chars; # get the next character - @result[$index] = $char; # put the character at that index in the result - } - say "Input: \$string = '$string', \@indices = (" ~ @indices.join(',') ~ ")"; - say "Output: '" ~ @result.join('') ~ "'"; -} - -say "Task 1: Shuffle String"; -say "\nExample 1"; -shuffle_string('lacelengh', (3,2,0,5,4,8,6,7,1)); -say "\nExample 2"; -shuffle_string('rulepark', (4,7,3,1,0,5,2,6)); diff --git a/challenge-226/packy-anderson/raku/task-2.raku b/challenge-226/packy-anderson/raku/task-2.raku deleted file mode 100755 index 1065c220c0..0000000000 --- a/challenge-226/packy-anderson/raku/task-2.raku +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env raku - -sub min_positive (@ints) { - my @positive = @ints.grep({ $_ > 0 }); # only consider positive numbers - return unless @positive.elems; # return early if no positive nums - return @positive.reduce(&min); # find smallest -} - -sub zero_array (@ints) { - say "Input: \@ints = (" ~ @ints.join(', ') ~ ")"; - my @operations; - while ( my $min = min_positive(@ints) ) { - my $op_num = @operations.elems + 1; - for @ints <-> $int { - $int -= $min if $int > 0; - } - @operations.push("operation $op_num: pick $min => (" ~ @ints.join(', ') ~ ")"); - } - say "Output: " ~ @operations.elems; - if (@operations) { - say ""; - say @operations.join("\n"); - } -} - -say "Task 2: Zero Array"; -say "\nExample 1"; -zero_array([1, 5, 0, 3, 5]); - -say "\nExample 2"; -zero_array([0]); - -say "\nExample 3"; -zero_array([2, 1, 4, 0, 3]); diff --git a/challenge-226/perlboy1967/perl/ch-1.pl b/challenge-226/perlboy1967/perl/ch-1.pl new file mode 100755 index 0000000000..101492ab79 --- /dev/null +++ b/challenge-226/perlboy1967/perl/ch-1.pl @@ -0,0 +1,34 @@ +#!/bin/perl + +=pod + +The Weekly Challenge - 226 +- https://theweeklychallenge.org/blog/perl-weekly-challenge-226 + +Author: Niels 'PerlBoy' van Dijke + +Task 1: Shuffle String +Submitted by: Mohammad S Anwar + +You are given a string and an array of indices of same length as string. + +Write a script to return the string after re-arranging the indices in the correct order. + +=cut + +use v5.16; + +use common::sense; + +use Test::More; + +sub shuffleString ($@) { + my ($i,@c) = (0, split //, shift); + my @o; map {$o[$_] = $c[$i++]} @_; + return join '', @o; +} + +is(shuffleString('lacelengh', 3,2,0,5,4,8,6,7,1),'challenge'); +is(shuffleString('rulepark', 4,7,3,1,0,5,2,6),'perlraku'); + +done_testing; diff --git a/challenge-226/perlboy1967/perl/ch-2.pl b/challenge-226/perlboy1967/perl/ch-2.pl new file mode 100755 index 0000000000..d3d39dd8fb --- /dev/null +++ b/challenge-226/perlboy1967/perl/ch-2.pl @@ -0,0 +1,44 @@ +#!/bin/perl + +=pod + +The Weekly Challenge - 226 +- https://theweeklychallenge.org/blog/perl-weekly-challenge-226 + +Author: Niels 'PerlBoy' van Dijke + +Task 2: Zero Array +Submitted by: Mohammad S Anwar + +You are given an array of non-negative integers, @ints. + +Write a script to return the minimum number of operations to make every element equal zero. + +|| In each operation, you are required to pick a positive number less than or equal +|| to the smallest element in the array, then subtract that from each positive element +|| in the array. + +=cut + +use v5.16; + +use common::sense; + +use Test::More; + +sub zeroArray (@) { + @_ = grep {$_ > 0} sort {$a <=> $b} @_; + my $n = 0; + while (@_) { + my $i = shift; + @_ = grep {$_ > 0} map {$_ -= $i} @_; + $n++; + } + return $n; +} + +is(zeroArray(1,5,0,3,5),3); +is(zeroArray(0),0); +is(zeroArray(2,1,4,0,3),4); + +done_testing; diff --git a/challenge-226/perlboy1967/perl/ch1.pl b/challenge-226/perlboy1967/perl/ch1.pl deleted file mode 100755 index 101492ab79..0000000000 --- a/challenge-226/perlboy1967/perl/ch1.pl +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/perl - -=pod - -The Weekly Challenge - 226 -- https://theweeklychallenge.org/blog/perl-weekly-challenge-226 - -Author: Niels 'PerlBoy' van Dijke - -Task 1: Shuffle String -Submitted by: Mohammad S Anwar - -You are given a string and an array of indices of same length as string. - -Write a script to return the string after re-arranging the indices in the correct order. - -=cut - -use v5.16; - -use common::sense; - -use Test::More; - -sub shuffleString ($@) { - my ($i,@c) = (0, split //, shift); - my @o; map {$o[$_] = $c[$i++]} @_; - return join '', @o; -} - -is(shuffleString('lacelengh', 3,2,0,5,4,8,6,7,1),'challenge'); -is(shuffleString('rulepark', 4,7,3,1,0,5,2,6),'perlraku'); - -done_testing; diff --git a/challenge-226/perlboy1967/perl/ch2.pl b/challenge-226/perlboy1967/perl/ch2.pl deleted file mode 100755 index d3d39dd8fb..0000000000 --- a/challenge-226/perlboy1967/perl/ch2.pl +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/perl - -=pod - -The Weekly Challenge - 226 -- https://theweeklychallenge.org/blog/perl-weekly-challenge-226 - -Author: Niels 'PerlBoy' van Dijke - -Task 2: Zero Array -Submitted by: Mohammad S Anwar - -You are given an array of non-negative integers, @ints. - -Write a script to return the minimum number of operations to make every element equal zero. - -|| In each operation, you are required to pick a positive number less than or equal -|| to the smallest element in the array, then subtract that from each positive element -|| in the array. - -=cut - -use v5.16; - -use common::sense; - -use Test::More; - -sub zeroArray (@) { - @_ = grep {$_ > 0} sort {$a <=> $b} @_; - my $n = 0; - while (@_) { - my $i = shift; - @_ = grep {$_ > 0} map {$_ -= $i} @_; - $n++; - } - return $n; -} - -is(zeroArray(1,5,0,3,5),3); -is(zeroArray(0),0); -is(zeroArray(2,1,4,0,3),4); - -done_testing; diff --git a/challenge-226/robert-dicicco/perl/ch-1.pl b/challenge-226/robert-dicicco/perl/ch-1.pl new file mode 100644 index 0000000000..0a315b4df8 --- /dev/null +++ b/challenge-226/robert-dicicco/perl/ch-1.pl @@ -0,0 +1,50 @@ +#!/usr/bin/env perl +=begin comment +-------------------------------------- +AUTHOR: Robert DiCicco +DATE : 2023-07-17 +Challenge 226 Task 1 Shuffle String ( Perl ) +-------------------------------------- +=cut +use strict; +use warnings; + +my @strings = ('lacelengh', 'rulepark'); +my @indices = ([3,2,0,5,4,8,6,7,1],[4,7,3,1,0,5,2,6]); + +my $offset = 0; + +my %letters = (); +my $letter; + +for my $str ( @strings) { + my $ndx = $indices[$offset]; + print("Input: \$string = $str, \@indices = (@$ndx)\n"); + my $cnt = 0; + while ($cnt < length($str)) { + $letter = substr($str,$cnt,1); + $letters{$ndx->[$cnt++]} = $letter; + } + $cnt = 0; + print("Output: "); + while ($cnt < length($str)) { + print($letters{$cnt++}); + } + print("\n\n"); + $offset == scalar @indices ? exit : $offset++; +} + +=begin comment +-------------------------------------- +SAMPLE OUTPUT +perl ShuffleString.pl + +Input: $string = lacelengh, @indices = (3 2 0 5 4 8 6 7 1) +Output: challenge + +Input: $string = rulepark, @indices = (4 7 3 1 0 5 2 6) +Output: perlraku +-------------------------------------- +=cut + + diff --git a/challenge-226/robert-dicicco/raku/ch-1.raku b/challenge-226/robert-dicicco/raku/ch-1.raku new file mode 100644 index 0000000000..4ef2b38d2f --- /dev/null +++ b/challenge-226/robert-dicicco/raku/ch-1.raku @@ -0,0 +1,48 @@ +#!/usr/bin/env raku +=begin comment +-------------------------------------- +AUTHOR: Robert DiCicco +DATE : 2023-07-17 +Challenge 226 Task 1 Shuffle String ( Raku ) +-------------------------------------- +=end comment +use v6; + +my @strings = ('lacelengh', 'rulepark'); +my @indices = ([3,2,0,5,4,8,6,7,1],[4,7,3,1,0,5,2,6]); + +my $offset = 0; +my %letters = (); +my $letter; + +for ( @strings) -> $str { + my $ndx = @indices[$offset]; + print("Input: \$string = $str, \@indices = ($ndx)\n"); + my $cnt = 0; + while $cnt < $str.chars { + $letter = substr($str,$cnt,1); + %letters{$ndx[$cnt++]} = $letter; + } + $cnt = 0; + print("Output: "); + while $cnt < $str.chars { + print(%letters{$cnt++}); + } + print("\n\n"); + ($offset == @indices.elems) ?? (exit) !! ($offset++); +} + +=begin comment +-------------------------------------- +SAMPLE OUTPUT +raku ShuffleString.rk + +Input: $string = lacelengh, @indices = (3 2 0 5 4 8 6 7 1) +Output: challenge + +Input: $string = rulepark, @indices = (4 7 3 1 0 5 2 6) +Output: perlraku +-------------------------------------- +=end comment + + diff --git a/challenge-226/robert-dicicco/ruby/ch-1.rb b/challenge-226/robert-dicicco/ruby/ch-1.rb new file mode 100644 index 0000000000..e2d2c01a98 --- /dev/null +++ b/challenge-226/robert-dicicco/ruby/ch-1.rb @@ -0,0 +1,49 @@ +=begin +-------------------------------------- +AUTHOR: Robert DiCicco +DATE : 2023-07-17 +Challenge 226 Task 1 Shuffle String ( Ruby ) +-------------------------------------- +=end +strings = ["lacelengh", "rulepark"] +indices = [[3,2,0,5,4,8,6,7,1],[4,7,3,1,0,5,2,6]] + +offset = 0 +cnt = 0 + +strings.each do |str| + ndx = indices[offset] + puts("Input: \$string = #{str}, \@indices = #{ndx}\n"); + cnt = 0 + ln = str.length() + letters = Hash.new + while cnt < ln + letter = str[cnt,1]; + x = ndx[cnt] + letters[x] = letter + cnt += 1 + end + cnt = 0 + print("Output: "); + while cnt < ln + print(letters[cnt]) + cnt += 1 + end + print("\n\n") + offset += 1 +end + +=begin +-------------------------------------- +SAMPLE OUTPUT +ruby ShuffleString.rb + +Input: $string = lacelengh, @indices = [3, 2, 0, 5, 4, 8, 6, 7, 1] +Output: challenge + +Input: $string = rulepark, @indices = [4, 7, 3, 1, 0, 5, 2, 6] +Output: perlraku +-------------------------------------- +=end + + diff --git a/challenge-226/steven-wilson/perl/ch-01.pl b/challenge-226/steven-wilson/perl/ch-01.pl deleted file mode 100644 index 3abd2b581b..0000000000 --- a/challenge-226/steven-wilson/perl/ch-01.pl +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env perl - -use strict; -use warnings; -use Test::More; - -my $t_s1 = "lacelengh"; -my @t_i1 = (3,2,0,5,4,8,6,7,1); -my $t_s2 = "rulepark"; -my @t_i2 = (4,7,3,1,0,5,2,6); -cmp_ok( reorder_string( $t_s1, @t_i1 ), "eq", "challenge", "Example 1"); -cmp_ok( reorder_string( $t_s2, @t_i2 ), "eq", "perlraku", "Example 2"); -done_testing(); - -sub reorder_string { - my ($s, @i) = @_; - my @return_s; - for ( 0 .. (length ($s) - 1) ){ - $return_s[ $i[$_] ] = substr( $s, $_, 1 ); - } - local $" = ''; - return "@return_s"; -} - diff --git a/challenge-226/steven-wilson/perl/ch-1.pl b/challenge-226/steven-wilson/perl/ch-1.pl new file mode 100644 index 0000000000..3abd2b581b --- /dev/null +++ b/challenge-226/steven-wilson/perl/ch-1.pl @@ -0,0 +1,24 @@ +#!/usr/bin/env perl + +use strict; +use warnings; +use Test::More; + +my $t_s1 = "lacelengh"; +my @t_i1 = (3,2,0,5,4,8,6,7,1); +my $t_s2 = "rulepark"; +my @t_i2 = (4,7,3,1,0,5,2,6); +cmp_ok( reorder_string( $t_s1, @t_i1 ), "eq", "challenge", "Example 1"); +cmp_ok( reorder_string( $t_s2, @t_i2 ), "eq", "perlraku", "Example 2"); +done_testing(); + +sub reorder_string { + my ($s, @i) = @_; + my @return_s; + for ( 0 .. (length ($s) - 1) ){ + $return_s[ $i[$_] ] = substr( $s, $_, 1 ); + } + local $" = ''; + return "@return_s"; +} + diff --git a/challenge-226/ulrich-rieke/haskell/ch-1.hs b/challenge-226/ulrich-rieke/haskell/ch-1.hs new file mode 100755 index 0000000000..04a47d951a --- /dev/null +++ b/challenge-226/ulrich-rieke/haskell/ch-1.hs @@ -0,0 +1,15 @@ +module Challenge226 + where +import Data.List ( sortOn ) + +solution :: String -> [Int] -> String +solution str numbers = map snd $ sortOn fst $ zip numbers str + +main :: IO ( ) +main = do + putStrLn "Enter a string!" + str <- getLine + putStrLn "Enter some indices into the string, separated by blanks!" + numberstrings <- getLine + let numbers = map read $ words numberstrings + print $ solution str numbers diff --git a/challenge-226/ulrich-rieke/haskell/ch-2.hs b/challenge-226/ulrich-rieke/haskell/ch-2.hs new file mode 100755 index 0000000000..d2f9e1f217 --- /dev/null +++ b/challenge-226/ulrich-rieke/haskell/ch-2.hs @@ -0,0 +1,20 @@ +module Challenge226_2 + where + +mySubtr :: Int -> Int -> Int +mySubtr a b = if a - b < 0 then 0 else a - b + +solution :: [Int] -> Int +solution list = fst $ until ( all (\i -> i == 0 ) . snd ) step ( 0 , list ) + where + step :: ( Int , [Int] ) -> ( Int , [Int] ) + step ( num , aList ) = ( num + 1 , map (\n -> mySubtr n mini ) aList ) + where + mini :: Int + mini = minimum $ filter ( > 0 ) aList + +main :: IO ( ) +main = do + putStrLn "Enter some positive integers, separated by blanks!" + numberstrings <- getLine + print $ solution $ map read $ words numberstrings diff --git a/challenge-226/ulrich-rieke/perl/ch-1.pl b/challenge-226/ulrich-rieke/perl/ch-1.pl new file mode 100755 index 0000000000..6f0b53bd11 --- /dev/null +++ b/challenge-226/ulrich-rieke/perl/ch-1.pl @@ -0,0 +1,20 @@ +#!/usr/bin/perl ; +use strict ; +use warnings ; +use feature 'say' ; + +say "Enter a string!" ; +my $str = ; +chomp $str ; +say "Enter as many numbers as is given by the length of the string!" ; +say "Numbers should be the indices to the string, going from 0 to length - 1!" ; +my $numberstring = ; +chomp $numberstring ; +my @numbers = split( /\s/ , $numberstring ) ; +my @pairs ; +for my $pos (0..(length $str) - 1 ) { + push @pairs , [$numbers[ $pos ] , substr( $str , $pos , 1 ) ] ; +} +my @sorted = sort { $a->[0] <=> $b->[0] } @pairs ; +my @letters = map { $_->[1] } @sorted ; +say join( '' , @letters ) ; diff --git a/challenge-226/ulrich-rieke/perl/ch-2.pl b/challenge-226/ulrich-rieke/perl/ch-2.pl new file mode 100755 index 0000000000..3a2b7c13c5 --- /dev/null +++ b/challenge-226/ulrich-rieke/perl/ch-2.pl @@ -0,0 +1,27 @@ +#!/usr/bin/perl ; +use strict ; +use warnings ; +use feature 'say' ; +use List::Util qw ( all min ) ; + +sub mySubtr { + my $num = shift ; + my $mini = shift ; + $num -= $mini ; + if ( $num < 0 ) { + $num = 0 ; + } + return $num ; +} + +say "Enter some positive integers, separated by blanks!" ; +my $line = ; +chomp $line ; +my @numbers = split( /\s/ , $line ) ; +my $rounds = 0 ; +while ( not ( all { $_ == 0 } @numbers ) ) { + my $mini = min grep { $_ > 0 } @numbers ; + $rounds++ ; + @numbers = map { mySubtr( $_ , $mini ) } @numbers ; +} +say $rounds ; diff --git a/challenge-226/ulrich-rieke/raku/ch-1.raku b/challenge-226/ulrich-rieke/raku/ch-1.raku new file mode 100755 index 0000000000..1a638ee875 --- /dev/null +++ b/challenge-226/ulrich-rieke/raku/ch-1.raku @@ -0,0 +1,14 @@ +use v6 ; + +say "Please enter a string!" ; +my $str = $*IN.get ; +say "Please enter as many numbers as given by the length of the string!" ; +say "Numbers should go from 0 to - 1!" ; +my $numberstring = $*IN.get ; +my @numbers = $numberstring.words.map( {.Int} ) ; +my @pairs ; +for ( 0..$str.chars - 1 ) -> $pos { + @pairs.push( Pair.new( @numbers[ $pos ] , $str.substr( $pos , 1 ) ) ) ; +} +my @letters = @pairs.sort( {$^a.key.Int <=> $^b.key.Int} ).map( {$_.value} ) ; +say join( '' , @letters ) ; diff --git a/challenge-226/ulrich-rieke/raku/ch-2.raku b/challenge-226/ulrich-rieke/raku/ch-2.raku new file mode 100755 index 0000000000..8d37cb6679 --- /dev/null +++ b/challenge-226/ulrich-rieke/raku/ch-2.raku @@ -0,0 +1,20 @@ +use v6 ; + +sub mySubtr( $n is copy , $d is copy ) { + $n -= $d ; + if ( $n < 0 ) { + $n = 0 ; + } + return $n ; +} + +say "Enter some positive integers, separated by blanks!" ; +my $line = $*IN.get ; +my @numbers = $line.words.map( {.Int} ) ; +my $rounds = 0 ; +while ( not (so 0 == @numbers.all )) { + my $minimum = @numbers.grep( {$_ > 0} ).min ; + @numbers = @numbers.map( { mySubtr( $_ , $minimum ) } ) ; + $rounds++ ; +} +say $rounds ; diff --git a/challenge-226/ulrich-rieke/rust/ch-1.rs b/challenge-226/ulrich-rieke/rust/ch-1.rs new file mode 100755 index 0000000000..5ce0f8b1c0 --- /dev/null +++ b/challenge-226/ulrich-rieke/rust/ch-1.rs @@ -0,0 +1,25 @@ +use std::io ; + +fn main() { + println!("Please enter a string!"); + let mut inline : String = String::new( ) ; + io::stdin( ).read_line( &mut inline ).unwrap( ) ; + let entered_line : &str = &*inline ; + let changed : &str = entered_line.trim( ) ; + println!("Enter as many integers as the length of the string!"); + println!("They should go from 0 to the - 1!") ; + let mut second_line : String = String::new( ) ; + io::stdin( ).read_line( &mut second_line ).unwrap( ) ; + let numberline : &str = &*second_line ; + let numbers : Vec = numberline.split_whitespace( ).map( | s | + s.trim( ).parse::( ).unwrap( ) ).collect( ) ; + let mut letters : Vec<(usize, char)> = numbers.into_iter( ).zip( + changed.chars( ) ).collect( ) ; + let letterpairs : &mut [(usize, char)] = letters.as_mut_slice( ) ; + letterpairs.sort_by( | a , b | a.0.cmp( &b.0 ) ) ; + let mut solution : String = String::new( ) ; + for p in letterpairs.iter( ) { + solution.push( p.1 ) ; + } + println!("{}" , solution ) ; +} diff --git a/challenge-226/ulrich-rieke/rust/ch-2.rs b/challenge-226/ulrich-rieke/rust/ch-2.rs new file mode 100755 index 0000000000..211098ee37 --- /dev/null +++ b/challenge-226/ulrich-rieke/rust/ch-2.rs @@ -0,0 +1,23 @@ +use std::io ; + +fn main() { + println!("Please enter some positive integers, separated by blanks"); + let mut inline : String = String::new( ) ; + io::stdin( ).read_line( &mut inline ).unwrap( ) ; + let entered_line : &str = &*inline ; + let mut numbers : Vec = entered_line.split_whitespace( ).map( + | s | s.trim( ).parse::( ).unwrap( )).collect( ) ; + let mut rounds : u32 = 0 ; + while ! numbers.iter( ).all( | n | *n == 0 ) { + let smallest_pos : i32 = *numbers.iter( ).filter( | n | **n > 0 ). + min( ).unwrap( ) ; + for n in numbers.iter_mut( ) { + *n -= smallest_pos ; + if *n < 0 { + *n = 0 ; + } + } + rounds += 1 ; + } + println!("{}" , rounds) ; +} diff --git a/members.json b/members.json index 2db919fc24..109095c7a5 100644 --- a/members.json +++ b/members.json @@ -191,6 +191,7 @@ "ozzy" : "Ozzy", "p6steve" : "P6steve", "pablo-saavedra" : "Pablo Saavedra", + "packy-anderson" : "Packy Anderson", "paul-fajman" : "Paul Fajman", "paulo-custodio" : "Paulo Custodio", "pavel-jurca" : "Pavel Jurca", diff --git a/stats/pwc-challenge-225.json b/stats/pwc-challenge-225.json new file mode 100644 index 0000000000..fd43b7a2b5 --- /dev/null +++ b/stats/pwc-challenge-225.json @@ -0,0 +1,695 @@ +{ + "chart" : { + "type" : "column" + }, + "series" : [ + { + "name" : "The Weekly Challenge - 225", + "colorByPoint" : 1, + "data" : [ + { + "name" : "Adam Russell", + "drilldown" : "Adam Russell", + "y" : 4 + }, + { + "name" : "Ali Moradi", + "y" : 4, + "drilldown" : "Ali Moradi" + }, + { + "name" : "Andreas Voegele", + "y" : 2, + "drilldown" : "Andreas Voegele" + }, + { + "name" : "Arne Sommer", + "y" : 3, + "drilldown" : "Arne Sommer" + }, + { + "drilldown" : "Athanasius", + "y" : 4, + "name" : "Athanasius" + }, + { + "name" : "Avery Adams", + "drilldown" : "Avery Adams", + "y" : 4 + }, + { + "name" : "BarrOff", + "drilldown" : "BarrOff", + "y" : 2 + }, + { + "name" : "Bob Lied", + "drilldown" : "Bob Lied", + "y" : 2 + }, + { + "y" : 2, + "drilldown" : "Bruce Gray", + "name" : "Bruce Gray" + }, + { + "drilldown" : "Cheok-Yin Fung", + "y" : 1, + "name" : "Cheok-Yin Fung" + }, + { + "drilldown" : "Dave Jacoby", + "y" : 2, + "name" : "Dave Jacoby" + }, + { + "y" : 2, + "drilldown" : "David Ferrone", + "name" : "David Ferrone" + }, + { + "name" : "E. Choroba", + "drilldown" : "E. Choroba", + "y" : 2 + }, + { + "name" : "Flavio Poletti", + "drilldown" : "Flavio Poletti", + "y" : 6 + }, + { + "name" : "Jaldhar H. Vyas", + "y" : 5, + "drilldown" : "Jaldhar H. Vyas" + }, + { + "name" : "Jan Krnavek", + "drilldown" : "Jan Krnavek", + "y" : 2 + }, + { + "name" : "Joelle Maslak", + "drilldown" : "Joelle Maslak", + "y" : 2 + }, + { + "y" : 2, + "drilldown" : "Jorg Sommrey", + "name" : "Jorg Sommrey" + }, + { + "y" : 6, + "drilldown" : "Laurent Rosenfeld", + "name" : "Laurent Rosenfeld" + }, + { + "drilldown" : "Lubos Kolouch", + "y" : 2, + "name" : "Lubos Kolouch" + }, + { + "drilldown" : "Luca Ferrari", + "y" : 8, + "name" : "Luca Ferrari" + }, + { + "name" : "Mariano Spadaccini", + "drilldown" : "Mariano Spadaccini", + "y" : 1 + }, + { + "drilldown" : "Mark Anderson", + "y" : 2, + "name" : "Mark Anderson" + }, + { + "name" : "Matthew Neleigh", + "y" : 2, + "drilldown" : "Matthew Neleigh" + }, + { + "y" : 3, + "drilldown" : "Matthias Muth", + "name" : "Matthias Muth" + }, + { + "drilldown" : "Peter Campbell Smith", + "y" : 3, + "name" : "Peter Campbell Smith" + }, + { + "drilldown" : "PokGoPun", + "y" : 2, + "name" : "PokGoPun" + }, + { + "name" : "Robbie Hatley", + "y" : 3, + "drilldown" : "Robbie Hatley" + }, + { + "y" : 4, + "drilldown" : "Robert DiCicco", + "name" : "Robert DiCicco" + }, + { + "name" : "Robert Ransbottom", + "y" : 2, + "drilldown" : "Robert Ransbottom" + }, + { + "name" : "Roger Bell_West", + "drilldown" : "Roger Bell_West", + "y" : 5 + }, + { + "y" : 3, + "drilldown" : "Simon Green", + "name" : "Simon Green" + }, + { + "drilldown" : "Solathian", + "y" : 2, + "name" : "Solathian" + }, + { + "y" : 1, + "drilldown" : "Steven Wilson", + "name" : "Steven Wilson" + }, + { + "y" : 4, + "drilldown" : "Thomas Kohler", + "name" : "Thomas Kohler" + }, + { + "name" : "Ulrich Rieke", + "drilldown" : "Ulrich Rieke", + "y" : 4 + }, + { + "y" : 3, + "drilldown" : "W. Luis Mochan", + "name" : "W. Luis Mochan" + } + ] + } + ], + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "enabled" : 1, + "format" : "{point.y}" + } + } + }, + "title" : { + "text" : "The Weekly Challenge - 225" + }, + "tooltip" : { + "followPointer" : 1, + "pointFormat" : "{point.name}: {point.y:f}
", + "headerFormat" : "{series.name}
" + }, + "drilldown" : { + "series" : [ + { + "id" : "Adam Russell", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 2 + ] + ], + "name" : "Adam Russell" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ], + "name" : "Ali Moradi", + "id" : "Ali Moradi" + }, + { + "name" : "Andreas Voegele", + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Andreas Voegele" + }, + { + "id" : "Arne Sommer", + "name" : "Arne Sommer", + "data" : [ + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ], + "name" : "Athanasius", + "id" : "Athanasius" + }, + { + "id" : "Avery Adams", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 2 + ] + ], + "name" : "Avery Adams" + }, + { + "id" : "BarrOff", + "name" : "BarrOff", + "data" : [ + [ + "Perl", + 1 + ], + [ + "Raku", + 1 + ] + ] + }, + { + "id" : "Bob Lied", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Bob Lied" + }, + { + "name" : "Bruce Gray", + "data" : [ + [ + "Raku", + 2 + ] + ], + "id" : "Bruce Gray" + }, + { + "id" : "Cheok-Yin Fung", + "data" : [ + [ + "Perl", + 1 + ] + ], + "name" : "Cheok-Yin Fung" + }, + { + "id" : "Dave Jacoby", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Dave Jacoby" + }, + { + "id" : "David Ferrone", + "name" : "David Ferrone", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "id" : "E. Choroba", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "E. Choroba" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 2 + ] + ], + "name" : "Flavio Poletti", + "id" : "Flavio Poletti" + }, + { + "name" : "Jaldhar H. Vyas", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Jaldhar H. Vyas" + }, + { + "name" : "Jan Krnavek", + "data" : [ + [ + "Raku", + 2 + ] + ], + "id" : "Jan Krnavek" + }, + { + "id" : "Joelle Maslak", + "name" : "Joelle Maslak", + "data" : [ + [ + "Raku", + 2 + ] + ] + }, + { + "id" : "Jorg Sommrey", + "name" : "Jorg Sommrey", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "id" : "Laurent Rosenfeld", + "name" : "Laurent Rosenfeld", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 2 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Lubos Kolouch", + "id" : "Lubos Kolouch" + }, + { + "id" : "Luca Ferrari", + "data" : [ + [ + "Raku", + 2 + ], + [ + "Blog", + 6 + ] + ], + "name" : "Luca Ferrari" + }, + { + "id" : "Mariano Spadaccini", + "name" : "Mariano Spadaccini", + "data" : [ + [ + "Perl", + 1 + ] + ] + }, + { + "name" : "Mark Anderson", + "data" : [ + [ + "Raku", + 2 + ] + ], + "id" : "Mark Anderson" + }, + { + "id" : "Matthew Neleigh", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Matthew Neleigh" + }, + { + "name" : "Matthias Muth", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Matthias Muth" + }, + { + "name" : "Peter Campbell Smith", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Peter Campbell Smith" + }, + { + "name" : "PokGoPun", + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "PokGoPun" + }, + { + "id" : "Robbie Hatley", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Robbie Hatley" + }, + { + "id" : "Robert DiCicco", + "name" : "Robert DiCicco", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ] + }, + { + "data" : [ + [ + "Raku", + 2 + ] + ], + "name" : "Robert Ransbottom", + "id" : "Robert Ransbottom" + }, + { + "id" : "Roger Bell_West", + "name" : "Roger Bell_West", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "id" : "Simon Green", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Simon Green" + }, + { + "id" : "Solathian", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Solathian" + }, + { + "id" : "Steven Wilson", + "name" : "Steven Wilson", + "data" : [ + [ + "Perl", + 1 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 2 + ] + ], + "name" : "Thomas Kohler", + "id" : "Thomas Kohler" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ], + "name" : "Ulrich Rieke", + "id" : "Ulrich Rieke" + }, + { + "name" : "W. Luis Mochan", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "W. Luis Mochan" + } + ] + }, + "legend" : { + "enabled" : 0 + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "subtitle" : { + "text" : "[Champions: 37] Last updated at 2023-07-17 23:30:26 GMT" + }, + "xAxis" : { + "type" : "category" + } +} diff --git a/stats/pwc-current.json b/stats/pwc-current.json index b8180feb17..233f5eccde 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,25 +1,9 @@ { - "title" : { - "text" : "The Weekly Challenge - 225" - }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } - }, - "xAxis" : { - "type" : "category" + "legend" : { + "enabled" : 0 }, "subtitle" : { - "text" : "[Champions: 37] Last updated at 2023-07-17 00:05:15 GMT" - }, - "tooltip" : { - "pointFormat" : "{point.name}: {point.y:f}
", - "followPointer" : 1, - "headerFormat" : "{series.name}
" - }, - "chart" : { - "type" : "column" + "text" : "[Champions: 13] Last updated at 2023-07-17 23:33:48 GMT" }, "plotOptions" : { "series" : { @@ -32,61 +16,13 @@ }, "series" : [ { + "colorByPoint" : 1, + "name" : "The Weekly Challenge - 226", "data" : [ { - "drilldown" : "Adam Russell", - "name" : "Adam Russell", - "y" : 4 - }, - { - "name" : "Ali Moradi", - "y" : 4, - "drilldown" : "Ali Moradi" - }, - { - "name" : "Andreas Voegele", - "y" : 2, - "drilldown" : "Andreas Voegele" - }, - { - "drilldown" : "Arne Sommer", + "name" : "Arne Sommer", "y" : 3, - "name" : "Arne Sommer" - }, - { - "name" : "Athanasius", - "y" : 4, - "drilldown" : "Athanasius" - }, - { - "drilldown" : "Avery Adams", - "name" : "Avery Adams", - "y" : 4 - }, - { - "drilldown" : "BarrOff", - "name" : "BarrOff", - "y" : 2 - }, - { - "name" : "Bob Lied", - "y" : 2, - "drilldown" : "Bob Lied" - }, - { - "drilldown" : "Bruce Gray", - "name" : "Bruce Gray", - "y" : 2 - }, - { - "y" : 1, - "name" : "Cheok-Yin Fung", - "drilldown" : "Cheok-Yin Fung" - }, - { - "drilldown" : "Dave Jacoby", - "y" : 2, - "name" : "Dave Jacoby" + "drilldown" : "Arne Sommer" }, { "name" : "David Ferrone", @@ -94,181 +30,66 @@ "drilldown" : "David Ferrone" }, { - "drilldown" : "E. Choroba", - "y" : 2, - "name" : "E. Choroba" - }, - { - "drilldown" : "Flavio Poletti", - "y" : 6, - "name" : "Flavio Poletti" - }, - { - "name" : "Jaldhar H. Vyas", "y" : 5, - "drilldown" : "Jaldhar H. Vyas" - }, - { - "drilldown" : "Jan Krnavek", - "y" : 2, - "name" : "Jan Krnavek" - }, - { - "drilldown" : "Joelle Maslak", - "y" : 2, - "name" : "Joelle Maslak" - }, - { - "y" : 2, - "name" : "Jorg Sommrey", - "drilldown" : "Jorg Sommrey" - }, - { - "name" : "Laurent Rosenfeld", - "y" : 6, - "drilldown" : "Laurent Rosenfeld" + "drilldown" : "Jaldhar H. Vyas", + "name" : "Jaldhar H. Vyas" }, { - "drilldown" : "Lubos Kolouch", - "y" : 2, - "name" : "Lubos Kolouch" + "y" : 3, + "drilldown" : "Laurent Rosenfeld", + "name" : "Laurent Rosenfeld" }, { - "drilldown" : "Luca Ferrari", "name" : "Luca Ferrari", + "drilldown" : "Luca Ferrari", "y" : 8 }, { - "y" : 1, - "name" : "Mariano Spadaccini", - "drilldown" : "Mariano Spadaccini" - }, - { + "y" : 2, "drilldown" : "Mark Anderson", - "name" : "Mark Anderson", - "y" : 2 + "name" : "Mark Anderson" }, { - "drilldown" : "Matthew Neleigh", + "name" : "Niels van Dijke", "y" : 2, - "name" : "Matthew Neleigh" - }, - { - "drilldown" : "Matthias Muth", - "y" : 3, - "name" : "Matthias Muth" + "drilldown" : "Niels van Dijke" }, { - "name" : "Peter Campbell Smith", - "y" : 3, - "drilldown" : "Peter Campbell Smith" + "name" : "Packy Anderson", + "y" : 4, + "drilldown" : "Packy Anderson" }, { + "drilldown" : "PokGoPun", "y" : 2, - "name" : "PokGoPun", - "drilldown" : "PokGoPun" - }, - { - "name" : "Robbie Hatley", - "y" : 3, - "drilldown" : "Robbie Hatley" - }, - { - "drilldown" : "Robert DiCicco", - "name" : "Robert DiCicco", - "y" : 4 - }, - { - "drilldown" : "Robert Ransbottom", - "name" : "Robert Ransbottom", - "y" : 2 - }, - { - "drilldown" : "Roger Bell_West", - "y" : 5, - "name" : "Roger Bell_West" - }, - { - "name" : "Simon Green", - "y" : 3, - "drilldown" : "Simon Green" + "name" : "PokGoPun" }, { - "drilldown" : "Solathian", "y" : 2, - "name" : "Solathian" + "drilldown" : "Robert DiCicco", + "name" : "Robert DiCicco" }, { "y" : 1, - "name" : "Steven Wilson", - "drilldown" : "Steven Wilson" - }, - { - "drilldown" : "Thomas Kohler", - "y" : 4, - "name" : "Thomas Kohler" + "drilldown" : "Steven Wilson", + "name" : "Steven Wilson" }, { "drilldown" : "Ulrich Rieke", - "name" : "Ulrich Rieke", - "y" : 4 + "y" : 4, + "name" : "Ulrich Rieke" }, { - "drilldown" : "W. Luis Mochan", "name" : "W. Luis Mochan", - "y" : 3 + "y" : 3, + "drilldown" : "W. Luis Mochan" } - ], - "name" : "The Weekly Challenge - 225", - "colorByPoint" : 1 + ] } ], - "legend" : { - "enabled" : 0 - }, "drilldown" : { "series" : [ { - "name" : "Adam Russell", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", - 2 - ] - ], - "id" : "Adam Russell" - }, - { - "name" : "Ali Moradi", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ] - ], - "id" : "Ali Moradi" - }, - { - "name" : "Andreas Voegele", - "data" : [ - [ - "Perl", - 2 - ] - ], - "id" : "Andreas Voegele" - }, - { - "id" : "Arne Sommer", - "name" : "Arne Sommer", "data" : [ [ "Raku", @@ -278,129 +99,23 @@ "Blog", 1 ] - ] - }, - { - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ] ], - "name" : "Athanasius", - "id" : "Athanasius" - }, - { - "name" : "Avery Adams", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", - 2 - ] - ], - "id" : "Avery Adams" - }, - { - "id" : "BarrOff", - "data" : [ - [ - "Perl", - 1 - ], - [ - "Raku", - 1 - ] - ], - "name" : "BarrOff" - }, - { - "data" : [ - [ - "Perl", - 2 - ] - ], - "name" : "Bob Lied", - "id" : "Bob Lied" - }, - { - "name" : "Bruce Gray", - "data" : [ - [ - "Raku", - 2 - ] - ], - "id" : "Bruce Gray" - }, - { - "data" : [ - [ - "Perl", - 1 - ] - ], - "name" : "Cheok-Yin Fung", - "id" : "Cheok-Yin Fung" - }, - { - "name" : "Dave Jacoby", - "data" : [ - [ - "Perl", - 2 - ] - ], - "id" : "Dave Jacoby" + "name" : "Arne Sommer", + "id" : "Arne Sommer" }, { - "id" : "David Ferrone", "name" : "David Ferrone", "data" : [ [ "Perl", 2 ] - ] - }, - { - "data" : [ - [ - "Perl", - 2 - ] - ], - "name" : "E. Choroba", - "id" : "E. Choroba" - }, - { - "id" : "Flavio Poletti", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ], - [ - "Blog", - 2 - ] ], - "name" : "Flavio Poletti" + "id" : "David Ferrone" }, { + "id" : "Jaldhar H. Vyas", + "name" : "Jaldhar H. Vyas", "data" : [ [ "Perl", @@ -414,70 +129,28 @@ "Blog", 1 ] - ], - "name" : "Jaldhar H. Vyas", - "id" : "Jaldhar H. Vyas" - }, - { - "name" : "Jan Krnavek", - "data" : [ - [ - "Raku", - 2 - ] - ], - "id" : "Jan Krnavek" - }, - { - "id" : "Joelle Maslak", - "name" : "Joelle Maslak", - "data" : [ - [ - "Raku", - 2 - ] ] }, { - "id" : "Jorg Sommrey", - "data" : [ - [ - "Perl", - 2 - ] - ], - "name" : "Jorg Sommrey" - }, - { + "id" : "Laurent Rosenfeld", + "name" : "Laurent Rosenfeld", "data" : [ [ "Perl", - 2 + 1 ], [ "Raku", - 2 + 1 ], [ "Blog", - 2 - ] - ], - "name" : "Laurent Rosenfeld", - "id" : "Laurent Rosenfeld" - }, - { - "data" : [ - [ - "Perl", - 2 + 1 ] - ], - "name" : "Lubos Kolouch", - "id" : "Lubos Kolouch" + ] }, { - "id" : "Luca Ferrari", + "name" : "Luca Ferrari", "data" : [ [ "Raku", @@ -488,87 +161,49 @@ 6 ] ], - "name" : "Luca Ferrari" - }, - { - "name" : "Mariano Spadaccini", - "data" : [ - [ - "Perl", - 1 - ] - ], - "id" : "Mariano Spadaccini" + "id" : "Luca Ferrari" }, { - "id" : "Mark Anderson", + "name" : "Mark Anderson", "data" : [ [ "Raku", 2 ] ], - "name" : "Mark Anderson" + "id" : "Mark Anderson" }, { - "id" : "Matthew Neleigh", - "name" : "Matthew Neleigh", + "id" : "Niels van Dijke", "data" : [ [ "Perl", 2 ] - ] - }, - { - "name" : "Matthias Muth", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", - 1 - ] ], - "id" : "Matthias Muth" + "name" : "Niels van Dijke" }, { - "id" : "Peter Campbell Smith", "data" : [ [ "Perl", 2 ], [ - "Blog", - 1 - ] - ], - "name" : "Peter Campbell Smith" - }, - { - "name" : "PokGoPun", - "data" : [ - [ - "Perl", + "Rak