From a0ea2c78c8ac2bb33fb79ab151f86b3beb143647 Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Wed, 8 Mar 2023 23:32:11 +0000 Subject: - Added solutions by Avery Adams. - Added solutions by Jaldhar H. Vyas. - Added solutions by Mark Anderson. - Added solutions by Luca Ferrari. - Added solutions by Peter Campbell Smith. - Added solutions by W. Luis Mochan. - Added solutions by Paulo Custodio. - Added solutions by Cheok-Yin Fung. - Added solutions by E. Choroba. - Added solutions by Bob Lied. - Added solutions by Robbie Hatley. - Added solutions by Matthias Muth. - Added solutions by Lubos Kolouch. - Added solutions by Solathian. - Added solutions by Duncan C. White. - Added solutions by Kjetil Skotheim. - Added solutions by Marton Polgar. - Added solutions by David Ferrone. - Added solutions by Mariano Spadaccini. - Added solutions by Robert DiCicco. - Added solutions by Ulrich Rieke. - Added solutions by Laurent Rosenfeld. --- challenge-207/avery-adams/perl/ch-1.pl | 19 + challenge-207/avery-adams/perl/ch-2.pl | 15 + challenge-207/eric-cheung/python/ch-1.py | 30 + challenge-207/eric-cheung/python/ch-2.py | 32 + challenge-207/laurent-rosenfeld/blog.txt | 1 + challenge-207/laurent-rosenfeld/perl/ch-1.pl | 25 + challenge-207/laurent-rosenfeld/perl/ch-2.pl | 15 + challenge-207/laurent-rosenfeld/raku/ch-1.raku | 18 + challenge-207/laurent-rosenfeld/raku/ch-2.raku | 11 + challenge-207/robert-dicicco/julia/ch-1.jl | 55 + challenge-207/robert-dicicco/julia/ch-2.jl | 44 + challenge-207/robert-dicicco/perl/ch-1.pl | 66 + challenge-207/robert-dicicco/perl/ch-2.pl | 47 + challenge-207/robert-dicicco/python/ch-1.py | 47 + challenge-207/robert-dicicco/python/ch-2.py | 37 + challenge-207/robert-dicicco/raku/ch-1.raku | 58 + challenge-207/robert-dicicco/raku/ch-2.raku | 47 + challenge-207/robert-dicicco/ruby/ch-1.rb | 59 + challenge-207/robert-dicicco/ruby/ch-2.rb | 43 + challenge-207/ulrich-rieke/awk/ch-2.awk | 12 + challenge-207/ulrich-rieke/cpp/ch-1.cpp | 53 + challenge-207/ulrich-rieke/cpp/ch-2.cpp | 37 + challenge-207/ulrich-rieke/haskell/ch-1.hs | 17 + challenge-207/ulrich-rieke/haskell/ch-2.hs | 17 + challenge-207/ulrich-rieke/perl/ch-1.pl | 30 + challenge-207/ulrich-rieke/perl/ch-2.pl | 18 + challenge-207/ulrich-rieke/raku/ch-1.raku | 24 + challenge-207/ulrich-rieke/raku/ch-2.raku | 13 + challenge-207/ulrich-rieke/rust/ch-1.rs | 23 + challenge-207/ulrich-rieke/rust/ch-2.rs | 24 + stats/pwc-challenge-203.json | 551 ++--- stats/pwc-challenge-205.json | 320 +-- stats/pwc-challenge-206.json | 710 ++++++ stats/pwc-current.json | 602 ++---- stats/pwc-language-breakdown-summary.json | 68 +- stats/pwc-language-breakdown.json | 2735 ++++++++++++------------ stats/pwc-leaders.json | 454 ++-- stats/pwc-summary-1-30.json | 124 +- stats/pwc-summary-121-150.json | 116 +- stats/pwc-summary-151-180.json | 42 +- stats/pwc-summary-181-210.json | 50 +- stats/pwc-summary-211-240.json | 50 +- stats/pwc-summary-241-270.json | 118 +- stats/pwc-summary-271-300.json | 46 +- stats/pwc-summary-31-60.json | 42 +- stats/pwc-summary-61-90.json | 40 +- stats/pwc-summary-91-120.json | 104 +- stats/pwc-summary.json | 690 +++--- 48 files changed, 4604 insertions(+), 3195 deletions(-) create mode 100755 challenge-207/avery-adams/perl/ch-1.pl create mode 100755 challenge-207/avery-adams/perl/ch-2.pl create mode 100755 challenge-207/eric-cheung/python/ch-1.py create mode 100755 challenge-207/eric-cheung/python/ch-2.py create mode 100644 challenge-207/laurent-rosenfeld/blog.txt create mode 100644 challenge-207/laurent-rosenfeld/perl/ch-1.pl create mode 100644 challenge-207/laurent-rosenfeld/perl/ch-2.pl create mode 100644 challenge-207/laurent-rosenfeld/raku/ch-1.raku create mode 100644 challenge-207/laurent-rosenfeld/raku/ch-2.raku create mode 100644 challenge-207/robert-dicicco/julia/ch-1.jl create mode 100644 challenge-207/robert-dicicco/julia/ch-2.jl create mode 100644 challenge-207/robert-dicicco/perl/ch-1.pl create mode 100644 challenge-207/robert-dicicco/perl/ch-2.pl create mode 100644 challenge-207/robert-dicicco/python/ch-1.py create mode 100644 challenge-207/robert-dicicco/python/ch-2.py create mode 100644 challenge-207/robert-dicicco/raku/ch-1.raku create mode 100644 challenge-207/robert-dicicco/raku/ch-2.raku create mode 100644 challenge-207/robert-dicicco/ruby/ch-1.rb create mode 100644 challenge-207/robert-dicicco/ruby/ch-2.rb create mode 100644 challenge-207/ulrich-rieke/awk/ch-2.awk create mode 100644 challenge-207/ulrich-rieke/cpp/ch-1.cpp create mode 100644 challenge-207/ulrich-rieke/cpp/ch-2.cpp create mode 100644 challenge-207/ulrich-rieke/haskell/ch-1.hs create mode 100644 challenge-207/ulrich-rieke/haskell/ch-2.hs create mode 100644 challenge-207/ulrich-rieke/perl/ch-1.pl create mode 100644 challenge-207/ulrich-rieke/perl/ch-2.pl create mode 100644 challenge-207/ulrich-rieke/raku/ch-1.raku create mode 100644 challenge-207/ulrich-rieke/raku/ch-2.raku create mode 100644 challenge-207/ulrich-rieke/rust/ch-1.rs create mode 100644 challenge-207/ulrich-rieke/rust/ch-2.rs create mode 100644 stats/pwc-challenge-206.json diff --git a/challenge-207/avery-adams/perl/ch-1.pl b/challenge-207/avery-adams/perl/ch-1.pl new file mode 100755 index 0000000000..cca2172ef8 --- /dev/null +++ b/challenge-207/avery-adams/perl/ch-1.pl @@ -0,0 +1,19 @@ +#!/usr/bin/perl + +use strict; +use v5.10; + +my @list; + +foreach (@ARGV) { + if ($_ =~ /^[qwertyuiopQWERTYUIOP]*$/) {push @list, $_}; + if ($_ =~ /^[asdfghjklASDFGHJKL]*$/) {push @list, $_}; + if ($_ =~ /^[zxcvbnmZXCVBNM]*$/) {push @list, $_}; +} +if (scalar @list) { + foreach (@list) { + say $_; + } +} else { + say "I didn't find anything on one row of keys." +} diff --git a/challenge-207/avery-adams/perl/ch-2.pl b/challenge-207/avery-adams/perl/ch-2.pl new file mode 100755 index 0000000000..6693cb1f29 --- /dev/null +++ b/challenge-207/avery-adams/perl/ch-2.pl @@ -0,0 +1,15 @@ +#!/usr/bin/perl + +use strict; +use v5.10; +use List::Util "uniqint"; + +my @list = @ARGV; +my $hindex; + +sort { $b <=> $a } @list; + +for (my $index = 0; $index <= scalar @list; $index++) { + if ($index + 1 >= $list[$index]) {$hindex = $list[$index]; last}; +} +$hindex ? say $hindex : say "This researcher has no H-Index."; \ No newline at end of file diff --git a/challenge-207/eric-cheung/python/ch-1.py b/challenge-207/eric-cheung/python/ch-1.py new file mode 100755 index 0000000000..57ddd9e817 --- /dev/null +++ b/challenge-207/eric-cheung/python/ch-1.py @@ -0,0 +1,30 @@ + +arrKeyBoardRow = ["qwertyuiop", "asdfghjkl", "zxcvbnm"] + +arrInputWords = ["Hello", "Alaska", "Dad", "Peace"] ## Example 1 +## arrInputWords = ["OMG", "Bye"] ## Example 2 + +arrKeyBoardChar = [] +for arrLoop in arrKeyBoardRow: + arrKeyBoardChar.append(list(arrLoop)) + +arrOutputWords = [] + +for arrLoop in arrInputWords: + + strLoopLower = arrLoop.lower() + + for nIndx in range(0, len(arrKeyBoardChar)): + if strLoopLower[0] in arrKeyBoardChar[nIndx]: + break + + bSameRow = True + for nLoop in range(1, len(arrLoop)): + if strLoopLower[nLoop] not in arrKeyBoardChar[nIndx]: + bSameRow = False + break + + if bSameRow: + arrOutputWords.append(arrLoop) + +print (arrOutputWords) diff --git a/challenge-207/eric-cheung/python/ch-2.py b/challenge-207/eric-cheung/python/ch-2.py new file mode 100755 index 0000000000..b2da387f6b --- /dev/null +++ b/challenge-207/eric-cheung/python/ch-2.py @@ -0,0 +1,32 @@ + +## https://gist.github.com/restrepo/c5f8f9fd5504a3f93ae34dd10a5dd6b0 + +def hIndex(arrCitation): + + ### https://github.com/kamyu104/LeetCode/blob/master/Python/h-index.py + ### :type arrCitation: List[int] + ### :rtype: int + + ### Given an array of citations (each citation is a non-negative integer) + ### of a researcher, write a function to compute the researcher's h-index. + ### + ### According to the definition of h-index on Wikipedia: + ### "A scientist has index h if h of his/her N papers have + ### at least h citations each, and the other N − h papers have + ### no more than h citations each." + ### + ### For example, given arrCitation = [3, 0, 6, 1, 5], + ### which means the researcher has 5 papers in total + ### and each of them had received 3, 0, 6, 1, 5 citations respectively. + ### Since the researcher has 3 papers with at least 3 citations each and + ### the remaining two with no more than 3 citations each, his h-index is 3. + ### + ### Note: If there are several possible values for h, the maximum one is taken as the h-index. + + return sum(nLoop >= nIndx + 1 for nIndx, nLoop in enumerate(sorted(list(arrCitation), reverse = True))) + + +## arrInputCitation = [10, 8, 5, 4, 3] ## Example 1 +arrInputCitation = [25, 8, 5, 3, 3] ## Example 2 + +print (hIndex(arrInputCitation)) diff --git a/challenge-207/laurent-rosenfeld/blog.txt b/challenge-207/laurent-rosenfeld/blog.txt new file mode 100644 index 0000000000..ee125d75ae --- /dev/null +++ b/challenge-207/laurent-rosenfeld/blog.txt @@ -0,0 +1 @@ +https://blogs.perl.org/users/laurent_r/2023/03/perl-weekly-challenge-207-keyboard-word-and-h-index.html diff --git a/challenge-207/laurent-rosenfeld/perl/ch-1.pl b/challenge-207/laurent-rosenfeld/perl/ch-1.pl new file mode 100644 index 0000000000..76b6ac806c --- /dev/null +++ b/challenge-207/laurent-rosenfeld/perl/ch-1.pl @@ -0,0 +1,25 @@ +use strict; +use warnings; +use feature "say"; + +my @rows; +push @rows, {map {$_ => 1} split //, $_} + for "qwertyuiop", "asdfghjkl", "zxcvbnm"; + +for my $test ([], [], + []) { + say join " ", find_kb_word(@$test); +} + +sub find_kb_word { + my @out; + for my $word (@_) { + for my $row (@rows) { + my $eligible = 1; + push @out, $word and last + unless grep {not exists $row->{$_}} + split //, lc $word; + } + } + return @out ? @out : "()"; +} diff --git a/challenge-207/laurent-rosenfeld/perl/ch-2.pl b/challenge-207/laurent-rosenfeld/perl/ch-2.pl new file mode 100644 index 0000000000..d782914006 --- /dev/null +++ b/challenge-207/laurent-rosenfeld/perl/ch-2.pl @@ -0,0 +1,15 @@ +use strict; +use warnings; +use feature "say"; + +sub h_index { + my @ordered = sort { $b <=> $a } @_; + for my $i (0..$#ordered) { + return $i if $i+1 > $ordered[$i]; + } + # If we get here, then all papers qualify + return scalar @ordered; +} +for my $test ([<10 8 5 4 3>], [<25 8 5 3 3>], [<12 10 9 5 11>]) { + printf "%-15s => %d\n", "@$test", h_index @$test; +} diff --git a/challenge-207/laurent-rosenfeld/raku/ch-1.raku b/challenge-207/laurent-rosenfeld/raku/ch-1.raku new file mode 100644 index 0000000000..c5f6d464c2 --- /dev/null +++ b/challenge-207/laurent-rosenfeld/raku/ch-1.raku @@ -0,0 +1,18 @@ +my @rows; +push @rows, %(map { $_ => True }, $_.comb) + for "qwertyuiop", "asdfghjkl", "zxcvbnm"; + +sub find-kb-word (@in) { + my @out; + for @in -> $word { + for @rows -> %row { + push @out, $word and next + if %row{all $word.lc.comb}:exists; + } + } + return @out; +} +for , , + -> @test { + say find-kb-word @test; +} diff --git a/challenge-207/laurent-rosenfeld/raku/ch-2.raku b/challenge-207/laurent-rosenfeld/raku/ch-2.raku new file mode 100644 index 0000000000..60099cddef --- /dev/null +++ b/challenge-207/laurent-rosenfeld/raku/ch-2.raku @@ -0,0 +1,11 @@ +sub h-index (@citations) { + my @ordered = @citations.sort.reverse; + for 0..@ordered.end -> $i { + return $i if $i+1 > @ordered[$i]; + } + # If we get here, then all papers qualify + return @ordered.elems; +} +for <10 8 5 4 3>, <25 8 5 3 3>, <12 10 9 5 11> -> @test { + say "@test[]".fmt("%-15s => "), h-index @test; +} diff --git a/challenge-207/robert-dicicco/julia/ch-1.jl b/challenge-207/robert-dicicco/julia/ch-1.jl new file mode 100644 index 0000000000..d7f7f7071b --- /dev/null +++ b/challenge-207/robert-dicicco/julia/ch-1.jl @@ -0,0 +1,55 @@ +#!/usr/bin/env julia +#= +-------------------------------------- +AUTHOR: Robert DiCicco +DATE : 2023-03-06 +Challenge 207 Keyboard Word ( Julia ) +-------------------------------------- +=# +using Printf + +rows = ["qwertyuiop", "asdfghjkl", "zxcvbnm"] +words = ["Hello", "Alaska", "Dad", "Peace"], ["OMG", "Bye"] +flag = 0 + +function CheckLetters(w) + ln = length(w) + for j in 1:3 + flag = 0 + for x in 1:ln + if (occursin(w[x], rows[j])) + else + flag = 1 + end + end + if (flag == 0) + @printf("\t%s\n",w) + flag = 0 + end + end +end + +for wds in words + @printf("Input: @words = %s\n",wds) + println("Output:") + ln = length(wds) + for j in 1:ln + CheckLetters(lowercase(wds[j])) + end + println(" ") +end + +#= +-------------------------------------- +SAMPLE OUTPUT +julia .\KeyboardWord.jl +Input: @words = ["Hello", "Alaska", "Dad", "Peace"] +Output: + alaska + dad + +Input: @words = ["OMG", "Bye"] +Output: + +-------------------------------------- +=# diff --git a/challenge-207/robert-dicicco/julia/ch-2.jl b/challenge-207/robert-dicicco/julia/ch-2.jl new file mode 100644 index 0000000000..e5f96509b4 --- /dev/null +++ b/challenge-207/robert-dicicco/julia/ch-2.jl @@ -0,0 +1,44 @@ +#!/usr/bin/env julia +#= +---------------------------------- +AUTHOR: Robert DiCicco +DATE : 2023-03-07 +Challenge 207 H-Index ( Julia ) +---------------------------------- +=# +using Printf + +citations = [10,8,5,4,3],[25,8,5,3,3] + +function CalcIndex(c) + ln = length(c) + offset = ln + pos = ln + while offset >= 1 + if c[offset] >= pos + @printf("Output: %d\n", pos) + println(" ") + return + else + offset -= 1 + pos -= 1 + end + end +end + +for c in citations + @printf("Input: @citations = %s\n",c) + CalcIndex(c) +end + +#= +---------------------------------- +SAMPLE OUTPUT +julia .\HIndex.jl +Input: @citations = [10, 8, 5, 4, 3] +Output: 4 + +Input: @citations = [25, 8, 5, 3, 3] +Output: 3 +---------------------------------- +=# diff --git a/challenge-207/robert-dicicco/perl/ch-1.pl b/challenge-207/robert-dicicco/perl/ch-1.pl new file mode 100644 index 0000000000..4f74af30e4 --- /dev/null +++ b/challenge-207/robert-dicicco/perl/ch-1.pl @@ -0,0 +1,66 @@ +#!/usr/bin/env perl +=begin comment +-------------------------------------- +AUTHOR: Robert DiCicco +DATE : 2023-03-06 +Challenge 207 Keyboard Word ( Perl ) +-------------------------------------- +=cut +use strict; +use warnings; +use feature 'say'; + +my @rows = ("qwertyuiop", "asdfghjkl", "zxcvbnm"); +my @words = ("Hello Alaska Dad Peace", "OMG Bye"); + +sub do_nothing { + return; +} + +sub CheckLetters { + my $w = shift; + $w = lc($w); + my $flag = 0; + my $ln = length($w); + for my $ndx (0..2) { + for my $c (0..$ln-1) { + my $z = substr($w,$c,1); + if($rows[$ndx] =~ /$z/) { + do_nothing; + } else { + $flag = 1; + } + } + if ($flag == 0) { + say "\t$w"; + } + $flag = 0; + } +} + +for my $wds (@words) { + say "Input: \@array = [$wds]"; + say "Output: "; + my @split_words = split(" ",$wds); + foreach (@split_words) { + CheckLetters($_); + } + say " "; +} + +=begin comment +-------------------------------------- +SAMPLE OUTPUT +perl .\KeyboardWord.pl +Input: @array = [Hello Alaska Dad Peace] +Output: + alaska + dad + +Input: @array = [OMG Bye] +Output: + +-------------------------------------- +=cut + + diff --git a/challenge-207/robert-dicicco/perl/ch-2.pl b/challenge-207/robert-dicicco/perl/ch-2.pl new file mode 100644 index 0000000000..5f4afcee9c --- /dev/null +++ b/challenge-207/robert-dicicco/perl/ch-2.pl @@ -0,0 +1,47 @@ +#!/usr/bin/env perl +=begin comment +---------------------------------- +AUTHOR: Robert DiCicco +DATE : 2023-03-07 +Challenge 207 H-Index ( Perl ) +================================== +=cut +use strict; +use warnings; +use feature "say"; + +my @citations = ([10,8,5,4,3],[25,8,5,3,3]); + +sub CalcIndex { + my $arr = shift; + my $ln = scalar(@$arr); + my $offset = $ln; + $offset = $ln-1; + my $pos = $ln; + while($offset >= 0) { + if(@$arr[$offset] >= $pos){ + say "Output: $pos\n"; + return; + } else { + $offset--; + $pos--; + } + } +} + +for my $c (@citations) { + say "Input: \@citations = [@$c]"; + CalcIndex($c); +} + +=begin comment +================================== +SAMPLE OUTPUT +perl .\HIndex.pl +Input: @citations = [10 8 5 4 3] +Output: 4 + +Input: @citations = [25 8 5 3 3] +Output: 3 +================================== +=cut diff --git a/challenge-207/robert-dicicco/python/ch-1.py b/challenge-207/robert-dicicco/python/ch-1.py new file mode 100644 index 0000000000..850c89b0ce --- /dev/null +++ b/challenge-207/robert-dicicco/python/ch-1.py @@ -0,0 +1,47 @@ +#/usr/bin/env python +''' +-------------------------------------- +AUTHOR: Robert DiCicco +DATE : 2023-03-06 +Challenge 207 Keyboard Word ( Python ) +-------------------------------------- +''' + +rows = ["qwertyuiop", "asdfghjkl", "zxcvbnm"] +words = ["Hello", "Alaska", "Dad", "Peace"], ["OMG", "Bye"] +flag = 0 + +def CheckLetters(w): + ln = len(w) + for j in range(3): + flag = 0 + for x in range(ln): + if (w[x] in rows[j]): + pass + else: + flag = 1 + if flag == 0 : + print("\t",w) + flag = 0 + +for wds in words: + print("Input: @words = ",wds) + print("Output: ") + ln = len(wds) + for j in range(0,ln): + CheckLetters(wds[j].lower()) + print(" ") + +''' +-------------------------------------- +SAMPLE OUTPUT +python .\KeyboardWord.py +Input: @words = ['Hello', 'Alaska', 'Dad', 'Peace'] +Output: + alaska + dad + +Input: @words = ['OMG', 'Bye'] +Output: + +''' diff --git a/challenge-207/robert-dicicco/python/ch-2.py b/challenge-207/robert-dicicco/python/ch-2.py new file mode 100644 index 0000000000..4327ca5d04 --- /dev/null +++ b/challenge-207/robert-dicicco/python/ch-2.py @@ -0,0 +1,37 @@ +#!/usr/bin/env python +''' +---------------------------------- +AUTHOR: Robert DiCicco +DATE : 2023-03-07 +Challenge 207 H-Index ( Python ) +================================== +''' +citations = [10,8,5,4,3],[25,8,5,3,3] + +def CalcIndex(c): + ln = len(c) + offset = ln - 1 + pos = ln + while offset >= 0 : + if c[offset] >= pos : + print("Output: ",pos,"\n") + return + else : + offset -= 1 + pos -= 1 + +for c in citations: + print("Input: @citations =",c) + CalcIndex(c) + +''' +---------------------------------- +SAMPLE OUTPUT +python .\HIndex.py +Input: @citations = [10, 8, 5, 4, 3] +Output: 4 + +Input: @citations = [25, 8, 5, 3, 3] +Output: 3 +---------------------------------- +''' diff --git a/challenge-207/robert-dicicco/raku/ch-1.raku b/challenge-207/robert-dicicco/raku/ch-1.raku new file mode 100644 index 0000000000..ee2093a26c --- /dev/null +++ b/challenge-207/robert-dicicco/raku/ch-1.raku @@ -0,0 +1,58 @@ +#!/usr/bin/env raku +#`( +-------------------------------------- +AUTHOR: Robert DiCicco +DATE : 2023-03-06 +Challenge 207 Keyboard Word ( Raku ) +-------------------------------------- +) + +use v6; + +my @rows = ["qwertyuiop", "asdfghjkl", "zxcvbnm"]; +my @words = [["Hello Alaska Dad Peace"], ["OMG Bye"]]; + +sub CheckLetters($tw is copy) { + my $flag = 0; + $tw=$tw.lc; + for 0..2 -> $ndx { + for 0..$tw.chars-1 -> $c { + my $z = substr($tw,$c,1); + (@rows[$ndx].contains($z)) ?? (next) !! ($flag = 1); + } + if $flag == 0 { say "\t$tw" }; + $flag = 0; + } +} + +sub GetWords(@wds) { + my $ln = @wds.elems; + my @tw = @wds.split(' '); + for 0..$ln-1 -> $i { + my $test_word = @tw[$i]; + CheckLetters($test_word); + } + say " "; +} + +for (@words) -> @w { + say "Input: \@words = ",@w; + say "Output: "; + my @test_words = @w.split(' '); + GetWords(@test_words); +} + +#`( +-------------------------------------- +SAMPLE OUTPUT + raku .\KeyboardWord.rk +Input: @words = [Hello Alaska Dad Peace] +Output: + alaska + dad + +Input: @words = [OMG Bye] +Output: + +-------------------------------------- +) diff --git a/challenge-207/robert-dicicco/raku/ch-2.raku b/challenge-207/robert-dicicco/raku/ch-2.raku new file mode 100644 index 0000000000..754c3266d5 --- /dev/null +++ b/challenge-207/robert-dicicco/raku/ch-2.raku @@ -0,0 +1,47 @@ +#!/usr/bin/env raku +#`( +---------------------------------- +AUTHOR: Robert DiCicco +DATE : 2023-03-07 +Challenge 207 H-Index ( Raku) +================================== +) +use v6; + +my @citations = ([10,8,5,4,3],[25,8,5,3,3]); + +sub CalcIndex(@c) { + my $ln = @c.elems; + my $offset = $ln; + $offset = $ln-1; + my $pos = $ln; + while $offset >= 0 { + if @c[$offset] >= $pos { + say "Output: $pos\n"; + return; + } else { + $offset--; + $pos--; + } + } + +} + +for (@citations) -> @c { + say "Input: \@citations = ",@c; + CalcIndex(@c); +} + +#`( +---------------------------------- +SAMPLE OUTPUT + raku .\HIndex.rk +Input: @citations = [10 8 5 4 3] +Output: 4 + +Input: @citations = [25 8 5 3 3] +Output: 3 +---------------------------------- +) + + diff --git a/challenge-207/robert-dicicco/ruby/ch-1.rb b/challenge-207/robert-dicicco/ruby/ch-1.rb new file mode 100644 index 0000000000..c709241a3c --- /dev/null +++ b/challenge-207/robert-dicicco/ruby/ch-1.rb @@ -0,0 +1,59 @@ +#!/usr/bin/env ruby +=begin +-------------------------------------- +AUTHOR: Robert DiCicco +DATE : 2023-03-06 +Challenge 207 Keyboard Word ( Ruby ) +-------------------------------------- +=end + +$rows = ["qwertyuiop", "asdfghjkl", "zxcvbnm"] +words = [["Hello Alaska Dad Peace"], ["OMG Bye"]] +$flag = 0 + +def CheckLetters(w) + w = w.downcase # convert to lc + ln = w.length + (0..2).each do |str| + $flag = 0 + (0..ln-1).each do |x| + unless $rows[str].include? w[x] + $flag += 1 + end + end + if ($flag == 0) + puts("\t#{w}") + end + end + end + +def GetWords(tws) + tws.each do |tw| + tw.delete! '[]\"' + #puts("#{tw}") + CheckLetters(tw) + end + puts(" ") +end + +words.each do |wds| + puts("Input: @words = #{wds}") + puts("Output: ") + test_words = wds.to_s.split + GetWords(test_words) +end +=begin +------------------------------------------ +SAMPLE OUTPUT +ruby .\KeyboardWord.rb +Input: @words = ["Hello Alaska Dad Peace"] +Output: + alaska + dad + +Input: @words = ["OMG Bye"] +Output: +------------------------------------------- +=end + + diff --git a/challenge-207/robert-dicicco/ruby/ch-2.rb b/challenge-207/robert-dicicco/ruby/ch-2.rb new file mode 100644 index 0000000000..5e14ff6860 --- /dev/null +++ b/challenge-207/robert-dicicco/ruby/ch-2.rb @@ -0,0 +1,43 @@ +#!/usr/bin/env ruby +=begin +---------------------------------- +AUTHOR: Robert DiCicco +DATE : 2023-03-07 +Challenge 207 H-Index ( Ruby) +================================== +=end + +citations = [10,8,5,4,3],[25,8,5,3,3] + +def CalcIndex(c) + ln = c.length() + offset = ln - 1 + pos = ln + while offset >= 0 + if c[offset] >= pos + puts("Output: #{pos}") + puts + return + else + offset -= 1 + pos -= 1 + end + end +end + +citations.each do |c| + puts("Input: @citations = #{c}") + CalcIndex(c) +end + +=begin +================================== +SAMPLE OUTPUT +ruby .\HIndex.rb +Input: @citations = [10, 8, 5, 4, 3] +Output: 4 + +Input: @citations = [25, 8, 5, 3, 3] +Output: 3 +================================== +=end diff --git a/challenge-207/ulrich-rieke/awk/ch-2.awk b/challenge-207/ulrich-rieke/awk/ch-2.awk new file mode 100644 index 0000000000..5b4b95ff2d --- /dev/null +++ b/challenge-207/ulrich-rieke/awk/ch-2.awk @@ -0,0 +1,12 @@ +#!/usr/bin/awk -f +{ + h = 0 + for (i = 1 ; i <= NF ; i++) { + if ( $i >= i ) { + if ( i > h ) { + h = i + } + } + } + print h +} diff --git a/challenge-207/ulrich-rieke/cpp/ch-1.cpp b/challenge-207/ulrich-rieke/cpp/ch-1.cpp new file mode 100644 index 0000000000..90af3e4821 --- /dev/null +++ b/challenge-207/ulrich-rieke/cpp/ch-1.cpp @@ -0,0 +1,53 @@ +#include +#include +#include +#include +#include +#include + +std::vector split( const std::string & startline , + const std::string & sep ) { + std::vector separated ; + std::string::size_type start { 0 } ; + std::string::size_type pos ; + do { + pos = startline.find_first_of( sep , start ) ; + separated.push_back( startline.substr(start , pos - start )) ; + start = pos + 1 ; + } while ( pos != std::string::npos ) ; + return separated ; +} + +bool myCondition( std::string word ) { + static std::string row1 ( "qwertyuiop" ) ; + static std::string row2 ( "asdfghjkl" ) ; + static std::string row3 ( "zxcvbnm" ) ; + std::transform( word.begin( ) , word.end( ) , word.begin( ) , tolower ) ; + return std::all_of( word.begin( ), word.end( ) , []( char c ) {return row1.find(c) != + std::string::npos ; } ) || std::all_of( word.begin( ) , word.end( ) , + []( char c ){ return row2.find( c ) != std::string::npos ; } ) + || all_of( word.begin( ) , word.end( ) , []( char c ) { return + row3.find( c ) != std::string::npos ; } ) ; +} + +int main( ) { + std::cout << "Please enter some words, separated by blanks!\n" ; + std::string line ; + std::getline( std::cin , line ) ; + std::vector words ( split ( line , " " ) ) ; + std::vector output ; + for ( auto & st : words ) { + if ( myCondition( st ) ) + output.push_back( st ) ; + } + if ( output.size( ) > 0 ) { + std::cout << "(" ; + std::copy( output.begin( ) , output.end( ) , std::ostream_iterator( + std::cout , " " )) ; + std::cout << ")\n" ; + } + else { + std::cout << "()\n" ; + } + return 0 ; +} diff --git a/challenge-207/ulrich-rieke/cpp/ch-2.cpp b/challenge-207/ulrich-rieke/cpp/ch-2.cpp new file mode 100644 index 0000000000..cf957b6234 --- /dev/null +++ b/challenge-207/ulrich-rieke/cpp/ch-2.cpp @@ -0,0 +1,37 @@ +#include +#include +#include +#include + +std::vector split( const std::string & startline , + const std::string & sep ) { + std::vector separated ; + std::string::size_type start { 0 } ; + std::string::size_type pos ; + do { + pos = startline.find_first_of( sep , start ) ; + separated.push_back( startline.substr(start , pos - start )) ; + start = pos + 1 ; + } while ( pos != std::string::npos ) ; + return separated ; +} + +int main( ) { + std::cout << "Enter some integers, separated by a blank!\n" ; + std::string line ; + std::getline( std::cin , line ) ; + std::vector numberstrings( split( line , " " ) ) ; + std::vector numbers ; + for ( auto & st : numberstrings ) + numbers.push_back( std::stoi( st ) ) ; + std::sort( numbers.begin( ) , numbers.end( ) , []( int a , int b ) { + return a > b ; } ) ; + std::vector possible_h ; + for ( int i = 0 ; i < numbers.size( ) ; i++ ) { + if ( numbers[ i ] >= ( i + 1 ) ) + possible_h.push_back( i + 1 ) ; + } + std::cout << *max_element( possible_h.begin( ) , possible_h.end( ) ) << + std::endl ; + return 0 ; +} diff --git a/challenge-207/ulrich-rieke/haskell/ch-1.hs b/challenge-207/ulrich-rieke/haskell/ch-1.hs new file mode 100644 index 0000000000..a9ddb819d7 --- /dev/null +++ b/challenge-207/ulrich-rieke/haskell/ch-1.hs @@ -0,0 +1,17 @@ +module Challenge207 + where +import Data.Char ( toLower ) +import Data.List ( (!!) ) + +rows :: [String] +rows = ["qwertyuiop" , "asdfghjkl" , "zxcvbnm"] + +myCondition :: String -> Bool +myCondition s = all (\c -> elem c ( rows !! 0 ) ) low || all (\c -> elem c ( rows !! 1 ) ) +low || all (\c -> elem c ( rows !! 2 ) ) low +where + low :: String + low = map toLower s + +solution :: [String] -> [String] +solution termlist = filter myCondition termlist diff --git a/challenge-207/ulrich-rieke/haskell/ch-2.hs b/challenge-207/ulrich-rieke/haskell/ch-2.hs new file mode 100644 index 0000000000..dde9c88355 --- /dev/null +++ b/challenge-207/ulrich-rieke/haskell/ch-2.hs @@ -0,0 +1,17 @@ +module Challenge207_2 + where +import Data.List ( sortBy , (!!) ) + +solution :: [Int] -> Int +solution citations = maximum filtered +where + myComparator :: Int -> Int -> Ordering + myComparator a b + |a > b = LT + |a == b = EQ + |a < b = GT + sortedCitations :: [Int] + sortedCitations = sortBy myComparator citations + filtered :: [Int] + filtered = filter (\i -> sortedCitations !! (i - 1 ) >= i ) [1..length + citations ] diff --git a/challenge-207/ulrich-rieke/perl/ch-1.pl b/challenge-207/ulrich-rieke/perl/ch-1.pl new file mode 100644 index 0000000000..46c1e49ba1 --- /dev/null +++ b/challenge-207/ulrich-rieke/perl/ch-1.pl @@ -0,0 +1,30 @@ +#!/usr/bin/perl ; +use strict ; +use warnings ; +use feature 'say' ; + +my $row1 = "qwertyuiop" ; +my $row2 = "asdfghjkl" ; +my $row3 = "zxcvbnm" ; +say "Enter some words, separated by blanks!" ; +my $line = ; +chomp $line ; +my @words = split( /\s/ , $line ) ; +my @output ; +for my $word ( @words ) { + my @letters = split // , lc $word ; + my $len = scalar( @letters ) ; + if ( scalar ( grep { index( $row1 , $_ ) != -1 } @letters ) == $len || + scalar( grep { index( $row2 , $_ ) != -1 } @letters ) == $len || + scalar( grep { index( $row3 , $_ ) != -1 } @letters ) == $len ) { + push @output, $word ; + } +} +if ( @output ) { + print "(" ; + print join ',' , @output ; + say ")" ; +} +else { + say "()" ; +} diff --git a/challenge-207/ulrich-rieke/perl/ch-2.pl b/challenge-207/ulrich-rieke/perl/ch-2.pl new file mode 100644 index 0000000000..65bfe657c7 --- /dev/null +++ b/challenge-207/ulrich-rieke/perl/ch-2.pl @@ -0,0 +1,18 @@ +#!/usr/bin/perl ; +use strict ; +use warnings ; +use feature 'say' ; +use List::Util qw ( max ) ; + +say "Enter some integers, separated by a blank!" ; +my $line = ; +chomp $line ; +my @numbers = split( /\s/ , $line ) ; +my @sorted = sort { $b <=> $a } @numbers ; +my @possible_h ; +for my $i ( 0..scalar( @sorted ) - 1 ) { + if ( $sorted[ $i ] >= ( $i + 1 ) ) { + push @possible_h , $i + 1 ; + } +} +say max @possible_h ; diff --git a/challenge-207/ulrich-rieke/raku/ch-1.raku b/challenge-207/ulrich-rieke/raku/ch-1.raku new file mode 100644 index 0000000000..e4e213e62c --- /dev/null +++ b/challenge-207/ulrich-rieke/raku/ch-1.raku @@ -0,0 +1,24 @@ +use v6 ; + +my $row1 = "qwertyuiop" ; +my $row2 = "asdfghjkl" ; +my $row3 = "zxcvbnm" ; +say "Enter some words separated by blanks!" ; +my $line = $*IN.get ; +my @words = $line.words ; +my @output ; +for @words -> $word { + my @letters = $word.lc.comb ; + my $len = @letters.elems ; + if ( @letters.grep( { $row1.contains( $_ )} ).elems == $len || + @letters.grep( {$row2.contains( $_ )} ).elems == $len || + @letters.grep( {$row3.contains( $_)}).elems == $len ) { + @output.push( $word ) ; + } +} +if ( @output ) { + say @output.join( ',' ) ; +} +else { + say "()" ; +} diff --git a/challenge-207/ulrich-rieke/raku/ch-2.raku b/challenge-207/ulrich-rieke/raku/ch-2.raku new file mode 100644 index 0000000000..e12b2c72e2 --- /dev/null +++ b/challenge-207/ulrich-rieke/raku/ch-2.raku @@ -0,0 +1,13 @@ +use v6 ; + +say "Enter some integers, separated by a blank!" ; +my $line = $*IN.get ; +my @numbers = $line.words.map( {.Int} ) ; +my @sorted = @numbers.sort( { $^b <=> $^a } ) ; +my @possible_h ; +for (0..@sorted.elems - 1 ) -> $i { + if ( @sorted[ $i ] >= ( $i + 1 ) ) { + @possible_h.push( $i + 1 ) ; + } +} +say @possible_h.max ; diff --git a/challenge-207/ulrich-rieke/rust/ch-1.rs b/challenge-207/ulrich-rieke/rust/ch-1.rs new file mode 100644 index 0000000000..c2874a7e2e --- /dev/null +++ b/challenge-207/ulrich-rieke/rust/ch-1.rs @@ -0,0 +1,23 @@ +use std::io ; + +fn main() { + let row1 = "qwertyuiop" ; + let row2 = "asdfghjkl" ; + let row3 = "zxcvbnm" ; + println!("Enter some words, separated by blanks!"); + let mut inline : String = String::new( ) ; + io::stdin( ).read_line( &mut inline ).unwrap( ) ; + let entered_line : &str = &*inline ; + let entered_words : Vec<(usize, &str)> = entered_line.split_whitespace( ). + enumerate( ).map( |(i , s)| (i , s.trim( ))).collect( ) ; + let all_words : Vec<(&usize , String)> = entered_words.iter( ).map( | (i , s ) | + (i , s.trim( ).to_ascii_lowercase( ) )).collect( ) ; + let mut solution : Vec = Vec::new( ) ; + all_words.iter( ).filter( | (_i , s ) | { + let a_word : &str = s.as_str( ) ; + a_word.chars( ).all( | c | row1.contains( c ) ) || + a_word.chars( ).all( | c | row2.contains( c ) ) || + a_word.chars( ).all( | c | row3.contains( c )) + }).for_each( | (i , _w )| solution.push( entered_words[**i].1.to_string( )) ) ; + println!("{:?}" , solution ) ; +} diff --git a/challenge-207/ulrich-rieke/rust/ch-2.rs b/challenge-207/ulrich-rieke/rust/ch-2.rs new file mode 100644 index 0000000000..42bff57086 --- /dev/null +++ b/challenge-207/ulrich-rieke/rust/ch-2.rs @@ -0,0 +1,24 @@ +use std::io ; + +fn main() { + println!("Enter some integers, separated by a blank!"); + 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::( ).expect("Could not parse number")) + .collect( ) ; + let mut possible_h : Vec = Vec::new( ) ; + numbers.sort( ) ; + let mut reverse_order : Vec = Vec::new( ) ; + let mut rev_iter = numbers.iter( ).rev( ) ; + while let Some( n ) = rev_iter.next( ) { + reverse_order.push( *n ) ; + } + for i in 0..reverse_order.len( ) { + if reverse_order[i] >= (i + 1 ) { + possible_h.push( i + 1 ) ; + } + } + println!("{}" , possible_h.iter( ).max( ).unwrap( ) ) ; +} diff --git a/stats/pwc-challenge-203.json b/stats/pwc-challenge-203.json index eee0d1df29..19bb66115b 100644 --- a/stats/pwc-challenge-203.json +++ b/stats/pwc-challenge-203.json @@ -1,9 +1,218 @@ { + "legend" : { + "enabled" : 0 + }, + "xAxis" : { + "type" : "category" + }, + "chart" : { + "type" : "column" + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "subtitle" : { + "text" : "[Champions: 34] Last updated at 2023-03-08 23:09:17 GMT" + }, + "series" : [ + { + "data" : [ + { + "y" : 3, + "name" : "Arne Sommer", + "drilldown" : "Arne Sommer" + }, + { + "y" : 4, + "drilldown" : "Athanasius", + "name" : "Athanasius" + }, + { + "y" : 2, + "name" : "BarrOff", + "drilldown" : "BarrOff" + }, + { + "y" : 2, + "name" : "Bob Lied", + "drilldown" : "Bob Lied" + }, + { + "y" : 2, + "drilldown" : "Carlos Oliveira", + "name" : "Carlos Oliveira" + }, + { + "name" : "Cheok-Yin Fung", + "drilldown" : "Cheok-Yin Fung", + "y" : 1 + }, + { + "y" : 2, + "drilldown" : "Chicagoist", + "name" : "Chicagoist" + }, + { + "name" : "Colin Crain", + "drilldown" : "Colin Crain", + "y" : 2 + }, + { + "name" : "Dave Jacoby", + "drilldown" : "Dave Jacoby", + "y" : 3 + }, + { + "drilldown" : "David Ferrone", + "name" : "David Ferrone", + "y" : 2 + }, + { + "y" : 2, + "drilldown" : "Duncan C. White", + "name" : "Duncan C. White" + }, + { + "y" : 2, + "drilldown" : "E. Choroba", + "name" : "E. Choroba" + }, + { + "y" : 6, + "name" : "Flavio Poletti", + "drilldown" : "Flavio Poletti" + }, + { + "y" : 3, + "name" : "James Smith", + "drilldown" : "James Smith" + }, + { + "y" : 2, + "drilldown" : "Jan Krnavek", + "name" : "Jan Krnavek" + }, + { + "y" : 2, + "name" : "Jorg Sommrey", + "drilldown" : "Jorg Sommrey" + }, + { + "name" : "Kjetil Skotheim", + "drilldown" : "Kjetil Skotheim", + "y" : 2 + }, + { + "y" : 5, + "name" : "Laurent Rosenfeld", + "drilldown" : "Laurent Rosenfeld" + }, + { + "name" : "Lubos Kolouch", + "drilldown" : "Lubos Kolouch", + "y" : 2 + }, + { + "drilldown" : "Luca Ferrari", + "name" : "Luca Ferrari", + "y" : 8 + }, + { + "y" : 2, + "name" : "Mariano Spadaccini", + "drilldown" : "Mariano Spadaccini" + }, + { + "name" : "Mark Anderson", + "drilldown" : "Mark Anderson", + "y" : 2 + }, + { + "drilldown" : "Paulo Custodio", + "name" : "Paulo Custodio", + "y" : 2 + }, + { + "drilldown" : "Peter Campbell Smith", + "name" : "Peter Campbell Smith", + "y" : 3 + }, + { + "y" : 4, + "name" : "Pip Stuart", + "drilldown" : "Pip Stuart" + }, + { + "y" : 3, + "name" : "Robbie Hatley", + "drilldown" : "Robbie Hatley" + }, + { + "name" : "Robert DiCicco", + "drilldown" : "Robert DiCicco", + "y" : 2 + }, + { + "y" : 2, + "name" : "Robert Ransbottom", + "drilldown" : "Robert Ransbottom" + }, + { + "y" : 5, + "drilldown" : "Roger Bell_West", + "name" : "Roger Bell_West" + }, + { + "drilldown" : "Simon Green", + "name" : "Simon Green", + "y" : 1 + }, + { + "name" : "Solathian", + "drilldown" : "Solathian", + "y" : 2 + }, + { + "y" : 4, + "drilldown" : "Thomas Kohler", + "name" : "Thomas Kohler" + }, + { + "y" : 2, + "name" : "Ulrich Rieke", + "drilldown" : "Ulrich Rieke" + }, + { + "drilldown" : "W. Luis Mochan", + "name" : "W. Luis Mochan", + "y" : 3 + } + ], + "name" : "The Weekly Challenge - 203", + "colorByPoint" : 1 + } + ], + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + } + } + }, + "tooltip" : { + "followPointer" : 1, + "pointFormat" : "{point.name}: {point.y:f}
", + "headerFormat" : "{series.name}
" + }, "drilldown" : { "series" : [ { - "name" : "Arne Sommer", "id" : "Arne Sommer", + "name" : "Arne Sommer", "data" : [ [ "Raku", @@ -17,7 +226,6 @@ }, { "name" : "Athanasius", - "id" : "Athanasius", "data" : [ [ "Perl", @@ -27,37 +235,38 @@ "Raku", 2 ] - ] + ], + "id" : "Athanasius" }, { "id" : "BarrOff", - "name" : "BarrOff", "data" : [ [ "Raku", 2 ] - ] + ], + "name" : "BarrOff" }, { "id" : "Bob Lied", - "name" : "Bob Lied", "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "Bob Lied" }, { - "name" : "Carlos Oliveira", "id" : "Carlos Oliveira", "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "Carlos Oliveira" }, { "data" : [ @@ -70,24 +279,24 @@ "id" : "Cheok-Yin Fung" }, { + "name" : "Chicagoist", "data" : [ [ "Perl", 2 ] ], - "name" : "Chicagoist", "id" : "Chicagoist" }, { "name" : "Colin Crain", - "id" : "Colin Crain", "data" : [ [ "Perl", 2 ] - ] + ], + "id" : "Colin Crain" }, { "data" : [ @@ -100,18 +309,18 @@ 1 ] ], - "id" : "Dave Jacoby", - "name" : "Dave Jacoby" + "name" : "Dave Jacoby", + "id" : "Dave Jacoby" }, { "id" : "David Ferrone", - "name" : "David Ferrone", "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "David Ferrone" }, { "data" : [ @@ -124,18 +333,16 @@ "id" : "Duncan C. White" }, { - "id" : "E. Choroba", "name" : "E. Choroba", "data" : [ [ "Perl", 2 ] - ] + ], + "id" : "E. Choroba" }, { - "id" : "Flavio Poletti", - "name" : "Flavio Poletti", "data" : [ [ "Perl", @@ -149,11 +356,11 @@ "Blog", 2 ] - ] + ], + "name" : "Flavio Poletti", + "id" : "Flavio Poletti" }, { - "name" : "James Smith", - "id" : "James Smith", "data" : [ [ "Perl", @@ -163,17 +370,19 @@ "Blog", 1 ] - ] + ], + "name" : "James Smith", + "id" : "James Smith" }, { + "id" : "Jan Krnavek", + "name" : "Jan Krnavek", "data" : [ [ "Raku", 2 ] - ], - "name" : "Jan Krnavek", - "id" : "Jan Krnavek" + ] }, { "data" : [ @@ -186,16 +395,18 @@ "id" : "Jorg Sommrey" }, { + "id" : "Kjetil Skotheim", "data" : [ [ "Perl", 2 ] ], - "id" : "Kjetil Skotheim", "name" : "Kjetil Skotheim" }, { + "id" : "Laurent Rosenfeld", + "name" : "Laurent Rosenfeld", "data" : [ [ "Perl", @@ -209,21 +420,20 @@ "Blog", 1 ] - ], - "name" : "Laurent Rosenfeld", - "id" : "Laurent Rosenfeld" + ] }, { - "name" : "Lubos Kolouch", - "id" : "Lubos Kolouch", "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "Lubos Kolouch", + "id" : "Lubos Kolouch" }, { + "name" : "Luca Ferrari", "data" : [ [ "Raku", @@ -234,31 +444,39 @@ 6 ] ], - "name" : "Luca Ferrari", "id" : "Luca Ferrari" }, { + "name" : "Mariano Spadaccini", "data" : [ [ "Perl", 2 ] ], - "id" : "Mariano Spadaccini", - "name" : "Mariano Spadaccini" + "id" : "Mariano Spadaccini" }, { "name" : "Mark Anderson", - "id" : "Mark Anderson", "data" : [ [ "Raku", 2 ] - ] + ], + "id" : "Mark Anderson" + }, + { + "id" : "Paulo Custodio", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Paulo Custodio" }, { - "name" : "Peter Campbell Smith", "id" : "Peter Campbell Smith", "data" : [ [ @@ -269,10 +487,10 @@ "Blog", 1 ] - ] + ], + "name" : "Peter Campbell Smith" }, { - "name" : "Pip Stuart", "id" : "Pip Stuart", "data" : [ [ @@ -283,10 +501,10 @@ "Raku", 2 ] - ] + ], + "name" : "Pip Stuart" }, { - "id" : "Robbie Hatley", "name" : "Robbie Hatley", "data" : [ [ @@ -297,11 +515,10 @@ "Blog", 1 ] - ] + ], + "id" : "Robbie Hatley" }, { - "name" : "Robert DiCicco", - "id" : "Robert DiCicco", "data" : [ [ "Perl", @@ -311,19 +528,22 @@ "Raku", 1 ] - ] + ], + "name" : "Robert DiCicco", + "id" : "Robert DiCicco" }, { "id" : "Robert Ransbottom", - "name" : "Robert Ransbottom", "data" : [ [ "Raku", 2 ] - ] + ], + "name" : "Robert Ransbottom" }, { + "id" : "Roger Bell_West", "data" : [ [ "Perl", @@ -338,30 +558,31 @@ 1 ] ], - "name" : "Roger Bell_West", - "id" : "Roger Bell_West" + "name" : "Roger Bell_West" }, { - "id" : "Simon Green", - "name" : "Simon Green", "data" : [ [ "Perl", 1 ] - ] + ], + "name" : "Simon Green", + "id" : "Simon Green" }, { + "id" : "Solathian", "data" : [ [ "Perl", 2 ] ], - "id" : "Solathian", "name" : "Solathian" }, { + "id" : "Thomas Kohler", + "name" : "Thomas Kohler", "data" : [ [ "Perl", @@ -371,9 +592,7 @@ "Blog", 2 ] - ], - "id" : "Thomas Kohler", - "name" : "Thomas Kohler" + ] }, { "data" : [ @@ -386,12 +605,10 @@ 1 ] ], - "id" : "Ulrich Rieke", - "name" : "Ulrich Rieke" + "name" : "Ulrich Rieke", + "id" : "Ulrich Rieke" }, { - "name" : "W. Luis Mochan", - "id" : "W. Luis Mochan", "data" : [ [ "Perl", @@ -401,214 +618,12 @@ "Blog", 1 ] - ] + ], + "name" : "W. Luis Mochan", + "id" : "W. Luis Mochan" } ] }, - "series" : [ - { - "data" : [ - { - "y" : 3, - "drilldown" : "Arne Sommer", - "name" : "Arne Sommer" - }, - { - "name" : "Athanasius", - "y" : 4, - "drilldown" : "Athanasius" - }, - { - "y" : 2, - "drilldown" : "BarrOff", - "name" : "BarrOff" - }, - { - "y" : 2, - "drilldown" : "Bob Lied", - "name" : "Bob Lied" - }, - { - "name" : "Carlos Oliveira", - "y" : 2, - "drilldown" : "Carlos Oliveira" - }, - { - "y" : 1, - "drilldown" : "Cheok-Yin Fung", - "name" : "Cheok-Yin Fung" - }, - { - "y" : 2, - "drilldown" : "Chicagoist", - "name" : "Chicagoist" - }, - { - "drilldown" : "Colin Crain", - "y" : 2, - "name" : "Colin Crain" - }, - { - "y" : 3, - "drilldown" : "Dave Jacoby", - "name" : "Dave Jacoby" - }, - { - "name" : "David Ferrone", - "drilldown" : "David Ferrone", - "y" : 2 - }, - { - "name" : "Duncan C. White", - "y" : 2, - "drilldown" : "Duncan C. White" - }, - { - "drilldown" : "E. Choroba", - "y" : 2, - "name" : "E. Choroba" - }, - { - "y" : 6, - "drilldown" : "Flavio Poletti", - "name" : "Flavio Poletti" - }, - { - "y" : 3, - "drilldown" : "James Smith", - "name" : "James Smith" - }, - { - "y" : 2, - "drilldown" : "Jan Krnavek", - "name" : "Jan Krnavek" - }, - { - "name" : "Jorg Sommrey", - "drilldown" : "Jorg Sommrey", - "y" : 2 - }, - { - "name" : "Kjetil Skotheim", - "drilldown" : "Kjetil Skotheim", - "y" : 2 - }, - { - "name" : "Laurent Rosenfeld", - "drilldown" : "Laurent Rosenfeld", - "y" : 5 - }, - { - "name" : "Lubos Kolouch", - "drilldown" : "Lubos Kolouch", - "y" : 2 - }, - { - "drilldown" : "Luca Ferrari", - "y" : 8, - "name" : "Luca Ferrari" - }, - { - "drilldown" : "Mariano Spadaccini", - "y" : 2, - "name" : "Mariano Spadaccini" - }, - { - "y" : 2, - "drilldown" : "Mark Anderson", - "name" : "Mark Anderson" - }, - { - "name" : "Peter Campbell Smith", - "y" : 3, - "drilldown" : "Peter Campbell Smith" - }, - { - "drilldown" : "Pip Stuart", - "y" : 4, - "name" : "Pip Stuart" - }, - { - "y" : 3, - "drilldown" : "Robbie Hatley", - "name" : "Robbie Hatley" - }, - { - "name" : "Robert DiCicco", - "drilldown" : "Robert DiCicco", - "y" : 2 - }, - { - "drilldown" : "Robert Ransbottom", - "y" : 2, - "name" : "Robert Ransbottom" - }, - { - "name" : "Roger Bell_West", - "y" : 5, - "drilldown" : "Roger Bell_West" - }, - { - "name" : "Simon Green", - "y" : 1, - "drilldown" : "Simon Green" - }, - { - "drilldown" : "Solathian", - "y" : 2, - "name" : "Solathian" - }, - { - "y" : 4, - "drilldown" : "Thomas Kohler", - "name" : "Thomas Kohler" - }, - { - "name" : "Ulrich Rieke", - "y" : 2, - "drilldown" : "Ulrich Rieke" - }, - { - "drilldown" : "W. Luis Mochan", - "y" : 3, - "name" : "W. Luis Mochan" - } - ], - "colorByPoint" : 1, - "name" : "The Weekly Challenge - 203" - } - ], - "chart" : { - "type" : "column" - }, - "legend" : { - "enabled" : 0 - }, - "plotOptions" : { - "series" : { - "dataLabels" : { - "enabled" : 1, - "format" : "{point.y}" - }, - "borderWidth" : 0 - } - }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } - }, - "subtitle" : { - "text" : "[Champions: 33] Last updated at 2023-02-19 12:06:14 GMT" - }, - "xAxis" : { - "type" : "category" - }, - "tooltip" : { - "headerFormat" : "{series.name}
", - "followPointer" : 1, - "pointFormat" : "{point.name}: {point.y:f}
" - }, "title" : { "text" : "The Weekly Challenge - 203" } diff --git a/stats/pwc-challenge-205.json b/stats/pwc-challenge-205.json index d5468435a6..99688c8cc5 100644 --- a/stats/pwc-challenge-205.json +++ b/stats/pwc-challenge-205.json @@ -1,68 +1,45 @@ { - "xAxis" : { - "type" : "category" - }, - "plotOptions" : { - "series" : { - "dataLabels" : { - "format" : "{point.y}", - "enabled" : 1 - }, - "borderWidth" : 0 - } - }, - "legend" : { - "enabled" : 0 - }, - "chart" : { - "type" : "column" - }, - "subtitle" : { - "text" : "[Champions: 39] Last updated at 2023-03-06 02:11:16 GMT" - }, - "tooltip" : { - "headerFormat" : "{series.name}
", - "followPointer" : 1, - "pointFormat" : "{point.name}: {point.y:f}
" + "title" : { + "text" : "The Weekly Challenge - 205" }, "series" : [ { - "name" : "The Weekly Challenge - 205", + "colorByPoint" : 1, "data" : [ { - "drilldown" : "Ali Moradi", "y" : 4, + "drilldown" : "Ali Moradi", "name" : "Ali Moradi" }, { + "name" : "Arne Sommer", "drilldown" : "Arne Sommer", - "y" : 3, - "name" : "Arne Sommer" + "y" : 3 }, { - "drilldown" : "Athanasius", "y" : 4, + "drilldown" : "Athanasius", "name" : "Athanasius" }, { + "y" : 2, "drilldown" : "Avery Adams", - "name" : "Avery Adams", - "y" : 2 + "name" : "Avery Adams" }, { - "drilldown" : "BarrOff", "name" : "BarrOff", + "drilldown" : "BarrOff", "y" : 3 }, { - "drilldown" : "Bob Lied", + "name" : "Bob Lied", "y" : 2, - "name" : "Bob Lied" + "drilldown" : "Bob Lied" }, { + "y" : 5, "drilldown" : "Bruce Gray", - "name" : "Bruce Gray", - "y" : 5 + "name" : "Bruce Gray" }, { "name" : "Cheok-Yin Fung", @@ -70,29 +47,29 @@ "drilldown" : "Cheok-Yin Fung" }, { - "name" : "Dave Jacoby", "y" : 3, - "drilldown" : "Dave Jacoby" + "drilldown" : "Dave Jacoby", + "name" : "Dave Jacoby" }, { "y" : 2, - "name" : "David Ferrone", - "drilldown" : "David Ferrone" + "drilldown" : "David Ferrone", + "name" : "David Ferrone" }, { + "name" : "Duncan C. White", "drilldown" : "Duncan C. White", - "y" : 2, - "name" : "Duncan C. White" + "y" : 2 }, { - "drilldown" : "E. Choroba", "name" : "E. Choroba", + "drilldown" : "E. Choroba", "y" : 2 }, { - "drilldown" : "Flavio Poletti", + "name" : "Flavio Poletti", "y" : 6, - "name" : "Flavio Poletti" + "drilldown" : "Flavio Poletti" }, { "drilldown" : "Jaldhar H. Vyas", @@ -100,9 +77,9 @@ "name" : "Jaldhar H. Vyas" }, { - "name" : "James Smith", + "drilldown" : "James Smith", "y" : 3, - "drilldown" : "James Smith" + "name" : "James Smith" }, { "name" : "Jan Krnavek", @@ -115,19 +92,19 @@ "drilldown" : "Jorg Sommrey" }, { + "name" : "Kjetil Skotheim", "drilldown" : "Kjetil Skotheim", - "y" : 2, - "name" : "Kjetil Skotheim" + "y" : 2 }, { - "name" : "Laurent Rosenfeld", + "drilldown" : "Laurent Rosenfeld", "y" : 5, - "drilldown" : "Laurent Rosenfeld" + "name" : "Laurent Rosenfeld" }, { - "drilldown" : "Lubos Kolouch", "name" : "Lubos Kolouch", - "y" : 2 + "y" : 2, + "drilldown" : "Lubos Kolouch" }, { "drilldown" : "Luca Ferrari", @@ -135,29 +112,29 @@ "name" : "Luca Ferrari" }, { - "name" : "Mariano Spadaccini", + "drilldown" : "Mariano Spadaccini", "y" : 2, - "drilldown" : "Mariano Spadaccini" + "name" : "Mariano Spadaccini" }, { - "y" : 2, "name" : "Mark Anderson", - "drilldown" : "Mark Anderson" + "drilldown" : "Mark Anderson", + "y" : 2 }, { - "y" : 2, "name" : "Matthew Neleigh", + "y" : 2, "drilldown" : "Matthew Neleigh" }, { - "y" : 2, - "name" : "Matthias Muth", - "drilldown" : "Matthias Muth" + "drilldown" : "Matthias Muth", + "y" : 3, + "name" : "Matthias Muth" }, { + "name" : "Paulo Custodio", "drilldown" : "Paulo Custodio", - "y" : 2, - "name" : "Paulo Custodio" + "y" : 2 }, { "drilldown" : "Peter Campbell Smith", @@ -165,24 +142,24 @@ "name" : "Peter Campbell Smith" }, { - "drilldown" : "Pip Stuart", + "name" : "Pip Stuart", "y" : 4, - "name" : "Pip Stuart" + "drilldown" : "Pip Stuart" }, { - "name" : "Robbie Hatley", + "drilldown" : "Robbie Hatley", "y" : 3, - "drilldown" : "Robbie Hatley" + "name" : "Robbie Hatley" }, { + "drilldown" : "Robert DiCicco", "y" : 2, - "name" : "Robert DiCicco", - "drilldown" : "Robert DiCicco" + "name" : "Robert DiCicco" }, { "drilldown" : "Robert Ransbottom", - "name" : "Robert Ransbottom", - "y" : 2 + "y" : 2, + "name" : "Robert Ransbottom" }, { "name" : "Roger Bell_West", @@ -190,9 +167,9 @@ "drilldown" : "Roger Bell_West" }, { - "name" : "Simon Green", + "drilldown" : "Simon Green", "y" : 3, - "drilldown" : "Simon Green" + "name" : "Simon Green" }, { "name" : "Solathian", @@ -200,34 +177,65 @@ "drilldown" : "Solathian" }, { - "name" : "Thomas Kohler", + "drilldown" : "Thomas Kohler", "y" : 4, - "drilldown" : "Thomas Kohler" + "name" : "Thomas Kohler" }, { - "y" : 2, "name" : "Tyler Bird", - "drilldown" : "Tyler Bird" + "drilldown" : "Tyler Bird", + "y" : 2 }, { - "drilldown" : "Ulrich Rieke", "y" : 3, + "drilldown" : "Ulrich Rieke", "name" : "Ulrich Rieke"