From 01bbee2ef271e9c612e746dec11a48ff37c782fb Mon Sep 17 00:00:00 2001 From: Mohammad Sajid Anwar Date: Tue, 22 Apr 2025 16:52:26 +0100 Subject: - Added solutions by Eric Cheung. - Added solutions by Ulrich Rieke. - Added solutions by Feng Chang. - Added solutions by PokGoPun. - Added solutions by Bob Lied. - Added solutions by Niels van Dijke. - Added solutions by Conor Hoekstra. - Added solutions by David Ferrone. - Added solutions by W. Luis Mochan. - Added solutions by Jan Krnavek. - Added solutions by Wanderdoc. - Added solutions by Mark Anderson. - Added solutions by Peter Campbell Smith. - Added solutions by E. Choroba. - Added solutions by Vinod Kumar K. - Added solutions by Steven Wilson. - Added solutions by Roger Bell_West. --- challenge-318/conor-hoekstra/bqn/ch-1.bqn | 12 + challenge-318/conor-hoekstra/bqn/ch-2.bqn | 12 + challenge-318/conor-hoekstra/ch-1.bqn | 12 - challenge-318/conor-hoekstra/ch-2.bqn | 12 - challenge-318/eric-cheung/python/ch-1.py | 22 + challenge-318/eric-cheung/python/ch-2.py | 31 ++ challenge-318/perlboy1967/perl/ch-1.pl | 40 ++ challenge-318/perlboy1967/perl/ch-2.pl | 52 ++ challenge-318/perlboy1967/perl/ch1.pl | 40 -- challenge-318/perlboy1967/perl/ch2.pl | 52 -- challenge-318/ulrich-rieke/cpp/ch-1.cpp | 48 ++ challenge-318/ulrich-rieke/cpp/ch-2.cpp | 75 +++ challenge-318/ulrich-rieke/haskell/ch-1.hs | 12 + challenge-318/ulrich-rieke/haskell/ch-2.hs | 29 ++ challenge-318/ulrich-rieke/perl/ch-1.pl | 42 ++ challenge-318/ulrich-rieke/perl/ch-2.pl | 56 +++ challenge-318/ulrich-rieke/raku/ch-1.raku | 35 ++ challenge-318/ulrich-rieke/raku/ch-2.raku | 48 ++ challenge-318/ulrich-rieke/rust/ch-1.rs | 46 ++ challenge-318/ulrich-rieke/rust/ch-2.rs | 50 ++ stats/pwc-challenge-317.json | 600 +++++++++++++++++++++++ stats/pwc-current.json | 564 +++++----------------- stats/pwc-language-breakdown-2019.json | 266 +++++------ stats/pwc-language-breakdown-2020.json | 736 ++++++++++++++-------------- stats/pwc-language-breakdown-2021.json | 682 +++++++++++++------------- stats/pwc-language-breakdown-2022.json | 384 +++++++-------- stats/pwc-language-breakdown-2023.json | 738 ++++++++++++++-------------- stats/pwc-language-breakdown-2024.json | 338 ++++++------- stats/pwc-language-breakdown-2025.json | 263 +++++----- stats/pwc-language-breakdown-summary.json | 68 +-- stats/pwc-leaders.json | 740 ++++++++++++++--------------- stats/pwc-summary-1-30.json | 108 ++--- stats/pwc-summary-121-150.json | 98 ++-- stats/pwc-summary-151-180.json | 112 ++--- stats/pwc-summary-181-210.json | 96 ++-- stats/pwc-summary-211-240.json | 48 +- stats/pwc-summary-241-270.json | 48 +- stats/pwc-summary-271-300.json | 118 ++--- stats/pwc-summary-301-330.json | 56 +-- stats/pwc-summary-31-60.json | 98 ++-- stats/pwc-summary-61-90.json | 58 +-- stats/pwc-summary-91-120.json | 108 ++--- stats/pwc-summary.json | 88 ++-- stats/pwc-yearly-language-summary.json | 88 ++-- 44 files changed, 4010 insertions(+), 3219 deletions(-) create mode 100644 challenge-318/conor-hoekstra/bqn/ch-1.bqn create mode 100644 challenge-318/conor-hoekstra/bqn/ch-2.bqn delete mode 100644 challenge-318/conor-hoekstra/ch-1.bqn delete mode 100644 challenge-318/conor-hoekstra/ch-2.bqn create mode 100755 challenge-318/eric-cheung/python/ch-1.py create mode 100755 challenge-318/eric-cheung/python/ch-2.py create mode 100755 challenge-318/perlboy1967/perl/ch-1.pl create mode 100755 challenge-318/perlboy1967/perl/ch-2.pl delete mode 100755 challenge-318/perlboy1967/perl/ch1.pl delete mode 100755 challenge-318/perlboy1967/perl/ch2.pl create mode 100755 challenge-318/ulrich-rieke/cpp/ch-1.cpp create mode 100755 challenge-318/ulrich-rieke/cpp/ch-2.cpp create mode 100755 challenge-318/ulrich-rieke/haskell/ch-1.hs create mode 100755 challenge-318/ulrich-rieke/haskell/ch-2.hs create mode 100755 challenge-318/ulrich-rieke/perl/ch-1.pl create mode 100755 challenge-318/ulrich-rieke/perl/ch-2.pl create mode 100755 challenge-318/ulrich-rieke/raku/ch-1.raku create mode 100755 challenge-318/ulrich-rieke/raku/ch-2.raku create mode 100755 challenge-318/ulrich-rieke/rust/ch-1.rs create mode 100755 challenge-318/ulrich-rieke/rust/ch-2.rs create mode 100644 stats/pwc-challenge-317.json diff --git a/challenge-318/conor-hoekstra/bqn/ch-1.bqn b/challenge-318/conor-hoekstra/bqn/ch-1.bqn new file mode 100644 index 0000000000..3716715e0b --- /dev/null +++ b/challenge-318/conor-hoekstra/bqn/ch-1.bqn @@ -0,0 +1,12 @@ +# For up to date code: +# https://github.com/codereport/bqn-code/blob/main/pwc/318-1.bqn + +u ⇐ •Import "/home/cph/bqn-test/test.bqn" +fn ⇐ •Import "/home/cph/bqn-code/lib/fun.bqn" + +Groups ← (3≤≠¨)⊸/fn.Group + +# Tests +u.UnitTest (Groups "abccccd") ≡ ⋈"cccc" +u.UnitTest (Groups "aaabcddddeefff") ≡ "aaa"‿"dddd"‿"fff" +u.UnitTest (Groups "abcdd") ≡ "" diff --git a/challenge-318/conor-hoekstra/bqn/ch-2.bqn b/challenge-318/conor-hoekstra/bqn/ch-2.bqn new file mode 100644 index 0000000000..c28b98440f --- /dev/null +++ b/challenge-318/conor-hoekstra/bqn/ch-2.bqn @@ -0,0 +1,12 @@ +# For up to date code: +# https://github.com/codereport/bqn-code/blob/main/pwc/318-2.bqn + +u ⇐ •Import "/home/cph/bqn-test/test.bqn" + +Rev ← { a‿b𝕊𝕩: ⌽⌾(a↑b↓⊢)𝕩 } +ReverseEquals ← { ∨´𝕨⊸≡¨Rev⟜𝕩¨∾1⊸+⊸((⌽⊣)↑¨(<˘⋈⌜))↕≠𝕩 } + +# Tests +u.UnitTest (⟨1,2,3,4⟩ ReverseEquals ⟨3,2,1,4⟩) ≡ 1 +u.UnitTest ( ⟨1,3,4⟩ ReverseEquals ⟨4,1,3⟩ ) ≡ 0 +u.UnitTest ( ⟨2⟩ ReverseEquals ⟨2⟩ ) ≡ 1 diff --git a/challenge-318/conor-hoekstra/ch-1.bqn b/challenge-318/conor-hoekstra/ch-1.bqn deleted file mode 100644 index 3716715e0b..0000000000 --- a/challenge-318/conor-hoekstra/ch-1.bqn +++ /dev/null @@ -1,12 +0,0 @@ -# For up to date code: -# https://github.com/codereport/bqn-code/blob/main/pwc/318-1.bqn - -u ⇐ •Import "/home/cph/bqn-test/test.bqn" -fn ⇐ •Import "/home/cph/bqn-code/lib/fun.bqn" - -Groups ← (3≤≠¨)⊸/fn.Group - -# Tests -u.UnitTest (Groups "abccccd") ≡ ⋈"cccc" -u.UnitTest (Groups "aaabcddddeefff") ≡ "aaa"‿"dddd"‿"fff" -u.UnitTest (Groups "abcdd") ≡ "" diff --git a/challenge-318/conor-hoekstra/ch-2.bqn b/challenge-318/conor-hoekstra/ch-2.bqn deleted file mode 100644 index c28b98440f..0000000000 --- a/challenge-318/conor-hoekstra/ch-2.bqn +++ /dev/null @@ -1,12 +0,0 @@ -# For up to date code: -# https://github.com/codereport/bqn-code/blob/main/pwc/318-2.bqn - -u ⇐ •Import "/home/cph/bqn-test/test.bqn" - -Rev ← { a‿b𝕊𝕩: ⌽⌾(a↑b↓⊢)𝕩 } -ReverseEquals ← { ∨´𝕨⊸≡¨Rev⟜𝕩¨∾1⊸+⊸((⌽⊣)↑¨(<˘⋈⌜))↕≠𝕩 } - -# Tests -u.UnitTest (⟨1,2,3,4⟩ ReverseEquals ⟨3,2,1,4⟩) ≡ 1 -u.UnitTest ( ⟨1,3,4⟩ ReverseEquals ⟨4,1,3⟩ ) ≡ 0 -u.UnitTest ( ⟨2⟩ ReverseEquals ⟨2⟩ ) ≡ 1 diff --git a/challenge-318/eric-cheung/python/ch-1.py b/challenge-318/eric-cheung/python/ch-1.py new file mode 100755 index 0000000000..f725ab5315 --- /dev/null +++ b/challenge-318/eric-cheung/python/ch-1.py @@ -0,0 +1,22 @@ + +## strInput = "abccccd" ## Example 1 +## strInput = "aaabcddddeefff" ## Example 2 +strInput = "abcdd" ## Example 3 + +arrOutput = [] +strTemp = "" + +for charLoop in strInput: + if not strTemp: + strTemp = charLoop + elif strTemp[-1] == charLoop: + strTemp = strTemp + charLoop + else: + if len(strTemp) >= 3: + arrOutput.append(strTemp) + strTemp = charLoop + +if len(strTemp) >= 3: + arrOutput.append(strTemp) + +print (arrOutput) diff --git a/challenge-318/eric-cheung/python/ch-2.py b/challenge-318/eric-cheung/python/ch-2.py new file mode 100755 index 0000000000..7f9b1ab0d4 --- /dev/null +++ b/challenge-318/eric-cheung/python/ch-2.py @@ -0,0 +1,31 @@ + +import sys + +## Example 1 +## arrSource = [3, 2, 1, 4] +## arrTarget = [1, 2, 3, 4] + +## Example 2 +## arrSource = [1, 3, 4] +## arrTarget = [4, 1, 3] + +## Example 3 +arrSource = [2] +arrTarget = [2] + +if len(arrSource) == 1: + print (True) + sys.exit() + +for nRowIndx in range(len(arrSource) - 1): + for nColIndx in range(nRowIndx + 1, len(arrSource)): + ## print (nRowIndx, nColIndx) + arrRevTemp = arrSource[nRowIndx : nColIndx + 1][::-1] + arrTemp = arrSource[:nRowIndx] + arrRevTemp + arrSource[nColIndx + 1:] + + if arrTarget == arrTemp: + print (True) + sys.exit() + +print (False) +sys.exit() diff --git a/challenge-318/perlboy1967/perl/ch-1.pl b/challenge-318/perlboy1967/perl/ch-1.pl new file mode 100755 index 0000000000..d299e84f48 --- /dev/null +++ b/challenge-318/perlboy1967/perl/ch-1.pl @@ -0,0 +1,40 @@ +#!/bin/perl + +=pod + +The Weekly Challenge - 318 +L + +Author: Niels 'PerlBoy' van Dijke + +Task 1: Group Position +Submitted by: Mohammad Sajid Anwar + +You are given a string of lowercase letters. + +Write a script to find the position of all groups in the given string. +Three or more consecutive letters form a group. Return "” if none found. + +=cut + +use v5.32; +use common::sense; +use feature qw(signatures); +use Test2::V0 qw(-no_srand); +no warnings qw(experimental::signatures); + +sub groupPosition ($str) { + my @r; + push(@r,$1.$2) while ($str =~ m#(.)(\1{2,})#g); + return @r; +} + +is([groupPosition('abccccd')], + [qw(cccc)],'Example 1'); +is([groupPosition('aaabcddddeefff')], + [qw(aaa dddd fff)],'Example 2'); +is([groupPosition('abcdd')], + [],'Example 3'); + +done_testing; + diff --git a/challenge-318/perlboy1967/perl/ch-2.pl b/challenge-318/perlboy1967/perl/ch-2.pl new file mode 100755 index 0000000000..261c227bd2 --- /dev/null +++ b/challenge-318/perlboy1967/perl/ch-2.pl @@ -0,0 +1,52 @@ +#!/bin/perl + +=pod + +The Weekly Challenge - 318 +L + +Author: Niels 'PerlBoy' van Dijke + +Task 2: Reverse Equals +Submitted by: Roger Bell_West + +You are given two arrays of integers, each containing the same elements as the other. + +Write a script to return true if one array can be made to equal the other by reversing +exactly one contiguous subarray. + +=cut + +use v5.32; +use common::sense; +use Test2::V0 qw(-no_srand); + +use boolean; +use List::MoreUtils qw(all indexes slide zip6); + +sub reverseEquals (\@\@) { + my ($ar1,$ar2) = @_; + + # Return true if equal lists + return true if (join('',@$ar1) eq join('',@$ar2)); + + # Find index of equal and unequal elements + my @ne = indexes { $$_[0] != $$_[1] } zip6 @$ar1,@$ar2; + boolean ( + all { $_ == 1 } slide { $b - $a == 1 ? + 1 : + join('',@$ar1[$a+1..$b-1]) eq join('',@$ar2[$a+1..$b-1]) + } @ne + and + join('',@$ar1[@ne]) eq join('',reverse @$ar2[@ne]) + ); +} + +is(reverseEquals(@{[3,2,1,4]},@{[1,2,3,4]}),true,'Example 1'); +is(reverseEquals(@{[1,3,4]},@{[4,1,3]}),false,'Example 2'); +is(reverseEquals(@{[2]},@{[2]}),true,'Example 3'); +is(reverseEquals(@{[1,2,3,3,2,1]},@{[2,1,3,2,3,1]}),false,'Own Example 1'); +is(reverseEquals(@{[1,2,3,2,3,4]},@{[3,2,3,2,1,4]}),true,'Own Example 2'); + +done_testing; + diff --git a/challenge-318/perlboy1967/perl/ch1.pl b/challenge-318/perlboy1967/perl/ch1.pl deleted file mode 100755 index d299e84f48..0000000000 --- a/challenge-318/perlboy1967/perl/ch1.pl +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/perl - -=pod - -The Weekly Challenge - 318 -L - -Author: Niels 'PerlBoy' van Dijke - -Task 1: Group Position -Submitted by: Mohammad Sajid Anwar - -You are given a string of lowercase letters. - -Write a script to find the position of all groups in the given string. -Three or more consecutive letters form a group. Return "” if none found. - -=cut - -use v5.32; -use common::sense; -use feature qw(signatures); -use Test2::V0 qw(-no_srand); -no warnings qw(experimental::signatures); - -sub groupPosition ($str) { - my @r; - push(@r,$1.$2) while ($str =~ m#(.)(\1{2,})#g); - return @r; -} - -is([groupPosition('abccccd')], - [qw(cccc)],'Example 1'); -is([groupPosition('aaabcddddeefff')], - [qw(aaa dddd fff)],'Example 2'); -is([groupPosition('abcdd')], - [],'Example 3'); - -done_testing; - diff --git a/challenge-318/perlboy1967/perl/ch2.pl b/challenge-318/perlboy1967/perl/ch2.pl deleted file mode 100755 index 261c227bd2..0000000000 --- a/challenge-318/perlboy1967/perl/ch2.pl +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/perl - -=pod - -The Weekly Challenge - 318 -L - -Author: Niels 'PerlBoy' van Dijke - -Task 2: Reverse Equals -Submitted by: Roger Bell_West - -You are given two arrays of integers, each containing the same elements as the other. - -Write a script to return true if one array can be made to equal the other by reversing -exactly one contiguous subarray. - -=cut - -use v5.32; -use common::sense; -use Test2::V0 qw(-no_srand); - -use boolean; -use List::MoreUtils qw(all indexes slide zip6); - -sub reverseEquals (\@\@) { - my ($ar1,$ar2) = @_; - - # Return true if equal lists - return true if (join('',@$ar1) eq join('',@$ar2)); - - # Find index of equal and unequal elements - my @ne = indexes { $$_[0] != $$_[1] } zip6 @$ar1,@$ar2; - boolean ( - all { $_ == 1 } slide { $b - $a == 1 ? - 1 : - join('',@$ar1[$a+1..$b-1]) eq join('',@$ar2[$a+1..$b-1]) - } @ne - and - join('',@$ar1[@ne]) eq join('',reverse @$ar2[@ne]) - ); -} - -is(reverseEquals(@{[3,2,1,4]},@{[1,2,3,4]}),true,'Example 1'); -is(reverseEquals(@{[1,3,4]},@{[4,1,3]}),false,'Example 2'); -is(reverseEquals(@{[2]},@{[2]}),true,'Example 3'); -is(reverseEquals(@{[1,2,3,3,2,1]},@{[2,1,3,2,3,1]}),false,'Own Example 1'); -is(reverseEquals(@{[1,2,3,2,3,4]},@{[3,2,3,2,1,4]}),true,'Own Example 2'); - -done_testing; - diff --git a/challenge-318/ulrich-rieke/cpp/ch-1.cpp b/challenge-318/ulrich-rieke/cpp/ch-1.cpp new file mode 100755 index 0000000000..628dfd75b5 --- /dev/null +++ b/challenge-318/ulrich-rieke/cpp/ch-1.cpp @@ -0,0 +1,48 @@ +#include +#include +#include +#include +#include + +bool isAscending( const std::vector & numbers ) { + int len = numbers.size( ) ; + for ( int i = 0 ; i < len - 1 ; i++ ) { + if ( numbers[i + 1] - numbers[i] != 1 ) + return false ; + } + return true ; +} + +int main( ) { + std::cout << "Enter a word!\n" ; + std::string word ; + std::cin >> word ; + std::map> positions ; + for ( int i = 0 ; i < word.length( ) ; i++ ) { + positions[word[i]].push_back( i ) ; + } + std::vector solution ; + for ( int i = 0 ; i < word.length( ) ; i++ ) { + auto it = positions.find( word[i] ) ; + int len = (it->second).size( ) ; + if ( len >= 3 && isAscending( it->second )) { + std::string current ; + for ( int i = 0 ; i < len ; i++ ) + current.push_back( it->first ) ; + if ( std::find( solution.begin( ) , solution.end( ) , current ) == + solution.end( ) ) { + solution.push_back( current ) ; + } + } + } + if ( solution.size( ) > 0 ) { + for ( auto s : solution ) + std::cout << s << ' ' ; + std::cout << '\n' ; + } + else { + std::cout << "\"\"" ; + std::cout << '\n' ; + } + return 0 ; +} diff --git a/challenge-318/ulrich-rieke/cpp/ch-2.cpp b/challenge-318/ulrich-rieke/cpp/ch-2.cpp new file mode 100755 index 0000000000..7908049b03 --- /dev/null +++ b/challenge-318/ulrich-rieke/cpp/ch-2.cpp @@ -0,0 +1,75 @@ +#include +#include +#include +#include +#include +#include +#include + +std::vector split( const std::string & text , char delimiter ) { + std::vector tokens ; + std::istringstream istr { text } ; + std::string word ; + while ( std::getline( istr , word , delimiter ) ) + tokens.push_back( word ) ; + return tokens ; +} + +bool isAscending( const std::vector &numbers ) { + int len = numbers.size( ) ; + for ( int i = 0 ; i < len - 1 ; i++ ) { + if ( numbers[ i + 1 ] - numbers[ i ] != 1 ) { + return false ; + } + } + return true ; +} + +int main( ) { + std::cout << "Enter some integers separated by blanks!\n" ; + std::string line ; + std::getline( std::cin , line ) ; + std::vector firstnums , secondnums ; + auto firsttokens { split( line , ' ' ) } ; + for ( auto s : firsttokens ) + firstnums.push_back( std::stoi( s ) ) ; + std::cout << "Enter the same integers in a different order!\n" ; + line.clear( ) ; + std::getline( std::cin , line ) ; + auto secondtokens { split( line , ' ' ) } ; + for ( auto s : secondtokens ) + secondnums.push_back( std::stoi( s ) ) ; + if ( firstnums.size( ) == 1 && secondnums.size( ) == 1 ) { + std::cout << "true\n" ; + } + else { + std::vector> positions ; + for ( int i = 0 ; i < firstnums.size( ) ; i++ ) { + positions.push_back( std::make_pair( i , i + static_cast( + std::distance( secondnums.begin( ) , std::find( secondnums.begin( ) , + secondnums.end( ) , firstnums[i] ) )))) ; + } + std::map> sums ; + for ( auto p : positions ) { + sums[p.second].push_back( p.first ) ; + } + std::vector>> sumpositions { sums.begin( ) , + sums.end( ) } ; + std::cout << std::boolalpha << ( std::count_if ( sumpositions.begin( ) , + sumpositions.end( ) , []( const auto & p ) { return p.second.size( ) + > 1 && isAscending( p.second ) ; } ) == 1 ) << '\n' ; + } + return 0 ; +} + + + + + + + + + + + + diff --git a/challenge-318/ulrich-rieke/haskell/ch-1.hs b/challenge-318/ulrich-rieke/haskell/ch-1.hs new file mode 100755 index 0000000000..94300aeac4 --- /dev/null +++ b/challenge-318/ulrich-rieke/haskell/ch-1.hs @@ -0,0 +1,12 @@ +module Challenge318 + where +import Data.List ( group ) + +solution :: String -> [String] +solution word = filter( (>= 3) . length ) $ group word + +main :: IO ( ) +main = do + putStrLn "Enter a word!" + word <- getLine + print $ solution word diff --git a/challenge-318/ulrich-rieke/haskell/ch-2.hs b/challenge-318/ulrich-rieke/haskell/ch-2.hs new file mode 100755 index 0000000000..6f86f2cfe1 --- /dev/null +++ b/challenge-318/ulrich-rieke/haskell/ch-2.hs @@ -0,0 +1,29 @@ +module Challenge318_2 + where +import Data.List ( groupBy ) +import Data.List.Split ( divvy ) +import Data.Maybe ( fromJust ) + +solution :: [Int] -> [Int] -> Bool +solution firstlist secondlist = + let + firstzipped = zip [0 , 1 .. ] firstlist + secondzipped = zip secondlist [0 , 1 .. ] + newPairs = map (\p -> ( fst p , fst p + ( fromJust $ lookup ( snd p ) + secondzipped ))) firstzipped + grouped = groupBy(\ p1 p2 -> snd p1 == snd p2 ) newPairs + moreThanOne = filter ( (> 1 ) . length ) grouped + in ( length $ filter ( isAscending . map fst ) moreThanOne ) == 1 + +isAscending :: [Int] -> Bool +isAscending list = all (\subli -> (last subli - head subli) == 1 ) $ + divvy 2 1 list + +main :: IO ( ) +main = do + putStrLn "Enter a first list of integers!" + line <- getLine + putStrLn "Enter a second list of integers with the same numbers!" + secondline <- getLine + if length line == 1 && length secondline == 1 then print "True" else + print $ solution ( map read $ words line ) ( map read $ words secondline) diff --git a/challenge-318/ulrich-rieke/perl/ch-1.pl b/challenge-318/ulrich-rieke/perl/ch-1.pl new file mode 100755 index 0000000000..9d809f7589 --- /dev/null +++ b/challenge-318/ulrich-rieke/perl/ch-1.pl @@ -0,0 +1,42 @@ +#!/usr/bin/perl ; +use strict ; +use warnings ; +use feature 'say' ; + +sub isAscending { + my $array = shift ; + my $len = scalar( @$array ) ; + for my $i (0..$len - 2 ) { + if ( $array->[$i + 1] - $array->[$i] != 1 ) { + return 0 ; + } + } + return 1 ; +} + +say "Enter a word!" ; +my $word = ; +chomp $word ; +my %wordpos ; +for my $pos ( 0..length( $word ) - 1 ) { + push( @{$wordpos{substr( $word , $pos , 1 ) }} , $pos ) ; +} +my @solution ; +my %found ; +for my $pos( 0..length( $word ) - 1 ) { + my @positions ; + map { push( @positions, $_ ) } @{$wordpos{substr( $word , $pos , 1 )}} ; + if ( scalar( @positions ) >= 3 && isAscending(\@positions)) { + my $string = substr( $word , $pos , 1 ) x (scalar( @positions ) ) ; + if ( not exists( $found{$string} )) { + push( @solution , $string ) ; + $found{$string}++ ; + } + } +} +if ( @solution ) { + say join( ',' , @solution ) ; +} +else { + say "\"\"" ; +} diff --git a/challenge-318/ulrich-rieke/perl/ch-2.pl b/challenge-318/ulrich-rieke/perl/ch-2.pl new file mode 100755 index 0000000000..eb35b4b499 --- /dev/null +++ b/challenge-318/ulrich-rieke/perl/ch-2.pl @@ -0,0 +1,56 @@ +#!/usr/bin/perl ; +use strict ; +use warnings ; +use feature 'say' ; + +sub find { + my $array = shift ; + my $elt = shift ; + my $pos = 0 ; + while ( $array->[$pos] != $elt ) { + $pos++ ; + } + return $pos ; +} + +say "Enter a list of integers!" ; +my $line = ; +chomp $line ; +my @firstnums = split( /\s+/ , $line ) ; +say "Enter a list of the same integers as above!" ; +$line = ; +chomp $line ; +my @secondnums = split( /\s+/ , $line ) ; +if ( scalar( @firstnums ) == 1 && scalar( @secondnums ) == 1 ) { + say "true" ; +} +else { + my @sumpositions ; + for my $pos (0..scalar( @firstnums) - 1 ) { + push( @sumpositions , [$pos , $pos + + find( \@secondnums, $firstnums[$pos] )] ) ; + } + my %sums ; + for my $elt ( @sumpositions ) { + push( @{$sums{$elt->[1]}} , $elt->[0] ) ; + } + my @selected = grep { scalar( @$_ ) > 1 && isAscending( $_ ) } values + %sums ; + if ( scalar( @selected ) == 1 ) { + say "true" ; + } + else { + say "false" ; + } +} + +sub isAscending { + my $array = shift ; + my $len = scalar( @$array ) ; + for my $pos (0..$len - 2 ) { + if ( $array->[$pos + 1] - $array->[$pos] != 1 ) { + return 0 ; + } + } + return 1 ; +} diff --git a/challenge-318/ulrich-rieke/raku/ch-1.raku b/challenge-318/ulrich-rieke/raku/ch-1.raku new file mode 100755 index 0000000000..f4ace36f56 --- /dev/null +++ b/challenge-318/ulrich-rieke/raku/ch-1.raku @@ -0,0 +1,35 @@ +use v6 ; + +say "Enter a word!" ; +my $word = $*IN.get ; +my %wordpos ; +my $len = $word.chars ; +for (0..$len - 1) -> $pos { + %wordpos{$word.substr( $pos , 1 ) }.push( $pos ) ; +} +my @solution ; +for ( 0..$len - 1) -> $pos { + my $part = $word.substr( $pos , 1 ) ; + my @positions ; + %wordpos{$part}.map( {@positions.push( $_ )} ) ; + if ( @positions.elems >= 3 && isAscending( @positions )) { + my $string = $part x @positions.elems ; + @solution.push( $string ) ; + } +} +if ( @solution ) { + say @solution.unique.join( ',' ) ; +} +else { + say "\"\"" ; +} + +sub isAscending( @array ) { + my $len = @array.elems ; + for ( 0..$len - 2 ) -> $pos { + if ( @array[$pos + 1] - @array[$pos] != 1 ) { + return False ; + } + } + return True ; +} diff --git a/challenge-318/ulrich-rieke/raku/ch-2.raku b/challenge-318/ulrich-rieke/raku/ch-2.raku new file mode 100755 index 0000000000..81817a9358 --- /dev/null +++ b/challenge-318/ulrich-rieke/raku/ch-2.raku @@ -0,0 +1,48 @@ +use v6 ; + +sub find ( @array , $element ) { + my $pos = 0 ; + while ( @array[$pos] != $element ) { + $pos++ ; + } + return $pos ; +} + +sub isAscending( $array ) { + my $len = $array.elems ; + for (0..$len - 2) -> $pos { + if ( $array[$pos + 1 ] - $array[$pos] != 1 ) { + return False ; + } + } + return True ; +} +#we create a list of the position of every integer in the first array +#and of the sum of the positions in the first and in the second array +#if part of the array is reversed the sum of the positions in the 2 +#arrays must be the same. We make these sums the keys of a hash and +#associate the positions in the first array with it +#output must be true if there is exactly one sum that is associated +#to an ascending list of length > 1 +say "Enter a list of integers!" ; +my $line = $*IN.get ; +my @firstnums = $line.words.map( {.Int} ) ; +say "Enter another list with the same integers!" ; +$line = $*IN.get ; +my @secondnums = $line.words.map( {.Int} ) ; +if ( @firstnums.elems == 1 && @secondnums.elems == 1 ) { + say "True" ; +} +else { + my @positionsums ; + for (0..@firstnums.elems - 1) -> $pos { + @positionsums.push( ($pos , $pos + find( @secondnums , + @firstnums[$pos]))) ; + } + my %sums ; + for @positionsums -> @elt { + %sums{@elt[1]}.push( @elt[0] ) ; + } + my @selected = %sums.values.grep( {$_.elems > 1 && isAscending( $_ )} ) ; + say ( @selected.elems == 1 ) ; +} diff --git a/challenge-318/ulrich-rieke/rust/ch-1.rs b/challenge-318/ulrich-rieke/rust/ch-1.rs new file mode 100755 index 0000000000..738f2a921b --- /dev/null +++ b/challenge-318/ulrich-rieke/rust/ch-1.rs @@ -0,0 +1,46 @@ +use std::io ; +use std::collections::HashMap ; + +fn is_ascending( positions : &Vec ) -> bool { + let mut result : bool = true ; + let len = positions.len( ) ; + for i in 0..len - 1 { + if positions[i + 1] - positions[i] != 1 { + result = false ; + break ; + } + } + result +} + +fn main() { + println!("Enter a word!"); + let mut inline : String = String::new( ) ; + io::stdin( ).read_line( &mut inline ).unwrap( ) ; + let word : &str = inline.trim( ) ; + let pairs : Vec<(usize, char)> = word.chars( ).enumerate( ).collect( ) ; + let mut positions : HashMap> = HashMap::new( ) ; + for ( n , c ) in pairs { + positions.entry( c ).and_modify( |v| v.push(n) ).or_insert( + vec![n] ) ; + } + let mut solution : Vec = Vec::new( ) ; + let mut all_keys : Vec<&char> = positions.keys( ).collect( ) ; + all_keys.sort( ) ; + for k in all_keys { + let v = positions.get( &*k ).unwrap( ) ; + if v.len( ) >= 3 && is_ascending( &v ) { + let mut a_word : String = String::new( ) ; + for _ in 0..v.len( ) { + a_word.push( *k ) ; + } + solution.push( a_word.clone( ) ) ; + } + } + if solution.len( ) > 0 { + println!("{:?}" , solution ) ; + } + else { + println!("\"\"") ; + } +} diff --git a/challenge-318/ulrich-rieke/rust/ch-2.rs b/challenge-318/ulrich-rieke/rust/ch-2.rs new file mode 100755 index 0000000000..9e9f03d969 --- /dev/null +++ b/challenge-318/ulrich-rieke/rust/ch-2.rs @@ -0,0 +1,50 @@ +use std::io ; +use std::collections::HashMap ; + +fn is_ascending( list : &Vec ) -> bool { + let mut result : bool = true ; + let len : usize = list.len( ) ; + for pos in 0..len - 1 { + if list[ pos + 1 ] - list[pos] != 1 { + result = false ; + break ; + } + } + result +} + +fn main() { + println!("Enter some integers separated by blanks!"); + let mut inline : String = String::new( ) ; + io::stdin( ).read_line( &mut inline ).unwrap( ) ; + println!("Enter another array which contains the same numbers!") ; + let mut secondline : String = String::new( ) ; + io::stdin( ).read_line( &mut secondline ).unwrap( ) ; + let firstnums : Vec = inline.trim( ).split_whitespace( ).map( |s| + s.parse::( ).unwrap( ) ).collect( ) ; + let secondnums : Vec = secondline.trim( ).split_whitespace( ).map( + |s| s.parse::( ).unwrap( ) ). collect( ) ; + if firstnums.len( ) == 1 && secondnums.len( ) == 1 { + println!("true") ; + } + else { + //we add up the positions of the numbers in the 2 arrays. If parts + //of the lists are reversed the sum of their positions is identical. + //We hash every sum with a list of their occurrences and see + //whether these lists are ascending + let positions_found : Vec<(usize , usize)> = firstnums.into_iter( ). + enumerate( ).map( |p| { + let found = secondnums.iter( ).position( |n| *n == p.1 ) + .unwrap() ; + (p.0 , p.0 + found) + }).collect( ) ; + let mut sum_positions : HashMap> = HashMap::new( ) ; + for ( a , b ) in positions_found { + sum_positions.entry( b ).and_modify( |v| v.push( a )).or_insert( + vec![a] ) ; + } + println!("{}" , sum_positions.values( ).into_iter().filter( |v| { + v.len( ) > 1 && is_ascending( &v ) + }).count( ) == 1 ) ; + } +} diff --git a/stats/pwc-challenge-317.json b/stats/pwc-challenge-317.json new file mode 100644 index 0000000000..e7504adde8 --- /dev/null +++ b/stats/pwc-challenge-317.json @@ -0,0 +1,600 @@ +{ + "xAxis" : { + "type" : "category" + }, + "drilldown" : { + "series" : [ + { + "name" : "Adam Russell", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 2 + ] + ], + "id" : "Adam Russell" + }, + { + "name" : "Ali Moradi", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Ali Moradi" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Andreas Mahnke", + "id" : "Andreas Mahnke" + }, + { + "name" : "Arne Sommer", + "data" : [ + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Arne Sommer" + }, + { + "name" : "Athanasius", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ], + "id" : "Athanasius" + }, + { + "data" : [ + [ + "Raku", + 1 + ] + ], + "name" : "BarrOff", + "id" : "BarrOff" + }, + { + "name" : "Bob Lied", + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Bob Lied" + }, + { + "id" : "Dave Jacoby", + "name" : "Dave Jacoby", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "id" : "David Ferrone", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "David Ferrone" + }, + { + "id" : "E. Choroba", + "name" : "E. Choroba", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "id" : "Feng Chang", + "data" : [ + [ + "Raku", + 2 + ] + ], + "name" : "Feng Chang" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Jaldhar H. Vyas", + "id" : "Jaldhar H. Vyas" + }, + { + "data" : [ + [ + "Raku", + 2 + ] + ], + "name" : "Jan Krnavek", + "id" : "Jan Krnavek" + }, + { + "name" : "Jorg Sommrey", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Jorg Sommrey" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Kjetil Skotheim", + "id" : "Kjetil Skotheim" + }, + { + "name" : "Lubos Kolouch", + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Lubos Kolouch" + }, + { + "name" : "Luca Ferrari", + "data" : [ + [ + "Raku", + 2 + ], + [ + "Blog", + 2 + ] + ], + "id" : "Luca Ferrari" + }, + { + "id" : "Mark Anderson", + "data" : [ + [ + "Raku", + 2 + ] + ], + "name" : "Mark Anderson" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Matthias Muth", + "id" : "Matthias Muth" + }, + { + "id" : "Niels van Dijke", + "name" : "Niels van Dijke", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "id" : "Peter Campbell Smith", + "name" : "Peter Campbell Smith", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "id" : "Peter Meszaros", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Peter Meszaros" + }, + { + "id" : "Robbie Hatley", + "name" : "Robbie Hatley", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "id" : "Robert Ransbottom", + "name" : "Robert Ransbottom", + "data" : [ + [ + "Raku", + 2 + ] + ] + }, + { + "name" : "Roger Bell_West", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Roger Bell_West" + }, + { + "id" : "Simon Green", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Simon Green" + }, + { + "id" : "Steve Hart", + "name" : "Steve Hart", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "name" : "Steven Wilson", + "data" : [ + [ + "Perl", + 1 + ] + ], + "id" : "Steven Wilson" + }, + { + "id" : "Thomas Kohler", + "name" : "Thomas Kohler", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 2 + ] + ] + }, + { + "name" : "Ulrich Rieke", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ], + "id" : "Ulrich Rieke" + }, + { + "id" : "W. Luis Mochan", + "name" : "W. Luis Mochan", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "name" : "Wanderdoc", + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Wanderdoc" + } + ] + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "enabled" : 1, + "format" : "{point.y}" + } + } + }, + "chart" : { + "type" : "column" + }, + "title" : { + "text" : "The Weekly Challenge - 317" + }, + "tooltip" : { + "pointFormat" : "{point.name}: {point.y:f}
", + "headerFormat" : "{series.name}
", + "followPointer" : 1 + }, + "subtitle" : { + "text" : "[Champions: 32] Last updated at 2025-04-22 15:52:00 GMT" + }, + "legend" : { + "enabled" : 0 + }, + "series" : [ + { + "name" : "The Weekly Challenge - 317", + "data" : [ + { + "y" : 4, + "drilldown" : "Adam Russell", + "name" : "Adam Russell" + }, + { + "y" : 3, + "drilldown" : "Ali Moradi", + "name" : "Ali Moradi" + }, + { + "drilldown" : "Andreas Mahnke", + "y" : 2, + "name" : "Andreas Mahnke" + }, + { + "name" : "Arne Sommer", + "drilldown" : "Arne Sommer", + "y" : 3 + }, + { + "name" : "Athanasius", + "drilldown" : "Athanasius", + "y" : 4 + }, + { + "name" : "BarrOff", + "drilldown" : "BarrOff", + "y" : 1 + }, + { + "name" : "Bob Lied", + "y" : 2, + "drilldown" : "Bob Lied" + }, + { + "drilldown" : "Dave Jacoby", + "y" : 3, + "name" : "Dave Jacoby" + }, + { + "drilldown" : "David Ferrone", + "y" : 2, + "name" : "David Ferrone" + }, + { + "name" : "E. Choroba", + "y" : 2, + "drilldown" : "E. Choroba" + }, + { + "name" : "Feng Chang", + "y" : 2, + "drilldown" : "Feng Chang" + }, + { + "name" : "Jaldhar H. Vyas", + "drilldown" : "Jaldhar H. Vyas", + "y" : 5 + }, + { + "name" : "Jan Krnavek", + "drilldown" : "Jan Krnavek", + "y" : 2 + }, + { + "y" : 3, + "drilldown" : "Jorg Sommrey", + "name" : "Jorg Sommrey" + }, + { + "name" : "Kjetil Skotheim", + "drilldown" : "Kjetil Skotheim", + "y" : 2 + }, + { + "drilldown" : "Lubos Kolouch", + "y" : 2, + "name" : "Lubos Kolouch" + }, + { + "name" : "Luca Ferrari", + "drilldown" : "Luca Ferrari", + "y" : 4 + }, + { + "name" : "Mark Anderson", + "y" : 2, + "drilldown" : "Mark Anderson" + }, + { + "name" : "Matthias Muth", + "drilldown" : "Matthias Muth", + "y" : 3 + }, + { + "y" : 2, + "drilldown" : "Niels van Dijke", + "name" : "Niels van Dijke" + }, + { + "name" : "Peter Campbell Smith", + "drilldown" : "Peter Campbell Smith", + "y" : 3 + }, + { + "drilldown" : "Peter Meszaros", + "y" : 2, + "name" : "Peter Meszaros" + }, + { + "drilldown" : "Robbie Hatley", + "y" : 3, + "name" : "Robbie Hatley" + }, + { + "name" : "Robert Ransbottom", + "y" : 2, + "drilldown" : "Robert Ransbottom" + }, + { + "y" : 5, + "drilldown" : "Roger Bell_West", + "name" : "Roger Bell_West" + }, + { + "name" : "Simon Green", + "drilldown" : "Simon Green", + "y" : 3 + }, + { + "name" : "Steve Hart", + "drilldown" : "Steve Hart", + "y" : 2 + }, + { + "name" : "Steven Wilson", + "y" : 1, + "drilldown" : "Steven Wilson" + }, + { + "drilldown" : "Thomas Kohler", + "y" : 4, + "name" : "Thomas Kohler" + }, + { + "name" : "Ulrich Rieke", + "drilldown" : "Ulrich Rieke", + "y" : 4 + }, + { + "drilldown" : "W. Luis Mochan", + "y" : 3, + "name" : "W. Luis Mochan" + }, + { + "drilldown" : "Wanderdoc", + "y" : 2, + "name" : "Wanderdoc" + } + ], + "colorByPoint" : 1 + } + ] +} diff --git a/stats/pwc-current.json b/stats/pwc-current.json index 3a7ef0950f..3da845f026 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,286 +1,51 @@ { + "title" : { + "text" : "The Weekly Challenge - 318" + }, + "chart" : { + "type" : "column" + }, + "plotOptions" : { + "series" : { + "dataLabels" : { + "enabled" : 1, + "format" : "{point.y}" + }, + "borderWidth" : 0 + } + }, + "legend" : { + "enabled" : 0 + }, "xAxis" : { "type" : "category" }, - "series" : [ - { - "data" : [ - { - "y" : 4, - "name" : "Adam Russell", - "drilldown" : "Adam Russell" - }, - { - "y" : 3, - "drilldown" : "Ali Moradi", - "name" : "Ali Moradi" - }, - { - "y" : 2, - "drilldown" : "Andreas Mahnke", - "name" : "Andreas Mahnke" - }, - { - "drilldown" : "Arne Sommer", - "name" : "Arne Sommer", - "y" : 3 - }, - { - "drilldown" : "Athanasius", - "name" : "Athanasius", - "y" : 4 - }, - { - "y" : 1, - "drilldown" : "BarrOff", - "name" : "BarrOff" - }, - { - "y" : 2, - "name" : "Bob Lied", - "drilldown" : "Bob Lied" - }, - { - "y" : 3, - "drilldown" : "Dave Jacoby", - "name" : "Dave Jacoby" - }, - { - "y" : 2, - "drilldown" : "David Ferrone", - "name" : "David Ferrone" - }, - { - "y" : 2, - "drilldown" : "E. Choroba", - "name" : "E. Choroba" - }, - { - "y" : 2, - "drilldown" : "Feng Chang", - "name" : "Feng Chang" - }, - { - "drilldown" : "Jaldhar H. Vyas", - "name" : "Jaldhar H. Vyas", - "y" : 5 - }, - { - "drilldown" : "Jan Krnavek", - "name" : "Jan Krnavek", - "y" : 2 - }, - { - "y" : 3, - "name" : "Jorg Sommrey", - "drilldown" : "Jorg Sommrey" - }, - { - "y" : 2, - "name" : "Kjetil Skotheim", - "drilldown" : "Kjetil Skotheim" - }, - { - "drilldown" : "Lubos Kolouch", - "name" : "Lubos Kolouch", - "y" : 2 - }, - { - "drilldown" : "Luca Ferrari", - "name" : "Luca Ferrari", - "y" : 4 - }, - { - "name" : "Mark Anderson", - "drilldown" : "Mark Anderson", - "y" : 2 - }, - { - "y" : 3, - "name" : "Matthias Muth", - "drilldown" : "Matthias Muth" - }, - { - "y" : 2, - "drilldown" : "Niels van Dijke", - "name" : "Niels van Dijke" - }, - { - "name" : "Peter Campbell Smith", - "drilldown" : "Peter Campbell Smith", - "y" : 3 - }, - { - "drilldown" : "Peter Meszaros", - "name" : "Peter Meszaros", - "y" : 2 - }, - { - "drilldown" : "Robbie Hatley", - "name" : "Robbie Hatley", - "y" : 3 - }, - { - "y" : 2, - "name" : "Robert Ransbottom", - "drilldown" : "Robert Ransbottom" - }, - { - "y" : 5, - "drilldown" : "Roger Bell_West", - "name" : "Roger Bell_West" - }, - { - "y" : 3, - "name" : "Simon Green", - "drilldown" : "Simon Green" - }, - { - "y" : 2, - "drilldown" : "Steve Hart", - "name" : "Steve Hart" - }, - { - "name" : "Thomas Kohler", - "drilldown" : "Thomas Kohler", - "y" : 4 - }, - { - "drilldown" : "Ulrich Rieke", - "name" : "Ulrich Rieke", - "y" : 4 - }, - { - "name" : "W. Luis Mochan", - "drilldown" : "W. Luis Mochan", - "y" : 3 - }, - { - "y" : 2, - "name" : "Wanderdoc", - "drilldown" : "Wanderdoc" - } - ], - "colorByPoint" : 1, - "name" : "The Weekly Challenge - 317" - } - ], "tooltip" : { + "headerFormat" : "{series.name}
", "pointFormat" : "{point.name}: {point.y:f}
", - "followPointer" : 1, - "headerFormat" : "{series.name}
" + "followPointer" : 1 }, "drilldown" : { "series" : [ { + "name" : "Bob Lied", "data" : [ [ "Perl", 2 - ], - [ - "Blog", - 2 ] ], - "id" : "Adam Russell", - "name" : "Adam Russell" + "id" : "Bob Lied" }, { - "name" : "Ali Moradi", - "id" : "Ali Moradi", "data" : [ [ "Perl", 2 - ], - [ - "Blog", - 1 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 2 - ] - ], - "id" : "Andreas Mahnke", - "name" : "Andreas Mahnke" - }, - { - "data" : [ - [ - "Raku", - 2 - ], - [ - "Blog", - 1 ] ], - "id" : "Arne Sommer", - "name" : "Arne Sommer" - }, - { - "id" : "Athanasius", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ] - ], - "name" : "Athanasius" - }, - { - "data" : [ - [ - "Raku", - 1 - ] - ], - "id" : "BarrOff", - "name" : "BarrOff" - }, - { - "data" : [ - [ - "Perl", - 2 - ] - ], - "id" : "Bob Lied", - "name" : "Bob Lied" - }, - { - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", - 1 - ] - ], - "id" : "Dave Jacoby", - "name" : "Dave Jacoby" - }, - { - "name" : "David Ferrone", - "data" : [ - [ - "Perl", - 2 - ] - ], - "id" : "David Ferrone" + "id" : "David Ferrone", + "name" : "David Ferrone" }, { "data" : [ @@ -294,149 +59,46 @@ }, { "name" : "Feng Chang", + "id" : "Feng Chang", "data" : [ [ "Raku", 2 ] - ], - "id" : "Feng Chang" - }, - { - "id" : "Jaldhar H. Vyas", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ], - [ - "Blog", - 1 - ] - ], - "name" : "Jaldhar H. Vyas" + ] }, { "name" : "Jan Krnavek", + "id" : "Jan Krnavek", "data" : [ [ "Raku", 2 ] - ], - "id" : "Jan Krnavek" - }, - { - "name" : "Jorg Sommrey", - "id" : "Jorg Sommrey", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", - 1 - ] - ] - }, - { - "name" : "Kjetil Skotheim", - "id" : "Kjetil Skotheim", - "data" : [ - [ - "Perl", - 2 - ] ] }, { - "name" : "Lubos Kolouch", - "id" : "Lubos Kolouch", - "data" : [ - [ - "Perl", - 2 - ] - ] - }, - { - "id" : "Luca Ferrari", - "data" : [ - [ - "Raku", - 2 - ], - [ - "Blog", - 2 - ] - ], - "name" : "Luca Ferrari" - }, - { - "id" : "Mark Anderson", + "name" : "Mark Anderson", "data" : [ [ "Raku", 2 ] ], - "name" : "Mark Anderson" + "id" : "Mark Anderson" }, { - "name" : "Matthias Muth", - "id" : "Matthias Muth", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", - 1 - ] - ] - }, - { - "name" : "Niels van Dijke", - "id" : "Niels van Dijke", - "data" : [ - [ - "Perl", - 2 - ] - ] - }, - { - "id" : "Peter Campbell Smith", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", - 1 - ] - ], - "name" : "Peter Campbell Smith" - }, - { - "id" : "Peter Meszaros", "data" : [ [ "Perl", 2 ] ], - "name" : "Peter Meszaros" + "id" : "Niels van Dijke", + "name" : "Niels van Dijke" }, { + "name" : "Peter Campbell Smith", "data" : [ [ "Perl", @@ -447,20 +109,10 @@ 1 ] ], - "id" : "Robbie Hatley", - "name" : "Robbie Hatley" - }, - { - "name" : "Robert Ransbottom", - "id" : "Robert Ransbottom", - "data" : [ - [ - "Raku", - 2 - ] - ] + "id" : "Peter Campbell Smith" }, { + "id" : "Roger Bell_West", "data" : [ [ "Perl", @@ -469,70 +121,36 @@ [ "Raku", 2 - ], - [ - "Blog", - 1 ] ], - "id" : "Roger Bell_West", "name" : "Roger Bell_West" }, { - "id" : "Simon Green", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", - 1 - ] - ], - "name" : "Simon Green" - }, - { - "name" : "Steve Hart", - "data" : [ - [ - "Perl", - 2 - ] - ], - "id" : "Steve Hart" - }, - { - "name" : "Thomas Kohler", + "id" : "Ulrich Rieke", "data" : [ [ "Perl", 2 ], [ - "Blog", + "Raku", 2 ] ], - "id" : "Thomas Kohler" + "name" : "Ulrich Rieke" }, { "data" : [ [ "Perl", 2 - ], - [ - "Raku", - 2 ] ], - "id" : "Ulrich Rieke", - "name" : "Ulrich Rieke" + "id" : "Vinod Kumar K", + "name" : "Vinod Kumar K" }, { "name" : "W. Luis Mochan", - "id" : "W. Luis Mochan", "data" : [ [ "Perl", @@ -542,44 +160,100 @@ "Blog", 1 ] - ] + ], + "id" : "W. Luis Mochan" }, { + "name" : "Wanderdoc", "id" : "Wanderdoc", "data" : [ [ "Perl", 2 ] - ], - "name" : "Wanderdoc" + ] } ] }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" + "series" : [ + { + "data" : [ + { + "y" : 2, + "name" : "Bob Lied", + "drilldown" : "Bob Lied" + }, + { + "drilldown" : "David Ferrone", + "y" : 2, + "name" : "David Ferrone" + }, + { + "drilldown" : "E. Choroba", + "name" : "E. Choroba", + "y" : 2 + }, + { + "drilldown" : "Feng Chang", + "y" : 2, + "name" : "Feng Chang" + }, + { + "name" : "Jan Krnavek", + "y" : 2, + "drilldown" : "Jan Krnavek" + }, + { + "drilldown" : "Mark Anderson", + "y" : 2, + "name" : "Mark Anderson" + }, + { + "drilldown" : "Niels van Dijke", + "name" : "Niels van Dijke", + "y" : 2 + }, + { + "y" : 3, + "name" : "Peter Campbell Smith", + "drilldown" : "Peter Campbell Smith" + }, + { + "name" : "Roger Bell_West", + "y" : 4, + "drilldown" : "Roger Bell_West" + }, + { + "drilldown" : "Ulrich Rieke", + "name" : "Ulrich Rieke", + "y" : 4 + }, + { + "drilldown" : "Vinod Kumar K", + "name" : "Vinod Kumar K", + "y" : 2 + }, + { + "y" : 3, + "name" : "W. Luis Mochan", + "drilldown" : "W. Luis Mochan" + }, + { + "name" : "Wanderdoc", + "y" : 2, + "drilldown" : "Wanderdoc" + } + ], + "colorByPoint" : 1, + "name" : "The Weekly Challenge - 318" } - }, - "chart" : { - "type" : "column" - }, - "title" : { - "text" : "The Weekly Challenge - 317" - }, - "legend" : { - "enabled" : 0 - }, + ], "subtitle" : { - "text" : "[Champions: 31] Last updated at 2025-04-21 02:36:58 GMT" + "text" : "[Champions: 13] Last updated at 2025-04-22 15:52:15 GMT" }, - "plotOptions" : { - "series" : { - "borderWidth" : 0, - "dataLabels" : { - "format" : "{point.y}", - "enabled" : 1 - } + "yAxis" : { + "title" : { + "text" : "Total Solutions" } } } diff --git a/stats/pwc-language-breakdown-2019.json b/stats/pwc-language-breakdown-2019.json index d2a6d68582..50e3d49f1d 100644 --- a/stats/pwc-language-breakdown-2019.json +++ b/stats/pwc-language-breakdown-2019.json @@ -1,7 +1,16 @@ { + "subtitle" : { + "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-04-22 15:52:15 GMT" + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, "drilldown" : { "series" : [ { + "name" : "041", "data" : [ [ "Perl", @@ -16,11 +25,9 @@ 9 ] ], - "id" : "041", - "name" : "041" + "id" : "041" }, { - "name" : "040", "data" : [ [ "Perl", @@ -35,10 +42,11 @@ 10 ] ], - "id" : "040" + "id" : "040", + "name" : "040" }, { - "id" : "039", + "name" : "039", "data" : [ [ "Perl", @@ -53,9 +61,10 @@ 12 ] ], - "name" : "039" + "id" : "039" }, { + "id" : "038", "data" : [ [ "Perl", @@ -70,7 +79,6 @@ 12 ] ], - "id" : "038", "name" : "038" }, { @@ -92,7 +100,7 @@ ] }, { - "id" : "036", + "name" : "036", "data" : [ [ "Perl", @@ -107,7 +115,7 @@ 11 ] ], - "name" : "036" + "id" : "036" }, { "name" : "035", @@ -146,7 +154,6 @@ "name" : "034" }, { - "name" : "033", "data" : [ [ "Perl", @@ -161,11 +168,11 @@ 10 ] ], - "id" : "033" + "id" : "033", + "name" : "033" }, { "name" : "032", - "id" : "032", "data" : [ [ "Perl", @@ -179,10 +186,10 @@ "Blog", 10 ] - ] + ], + "id" : "032" }, { - "name" : "031", "id" : "031", "data" : [ [ @@ -197,7 +204,8 @@ "Blog", 9 ] - ] + ], + "name" : "031" }, { "data" : [ @@ -218,7 +226,6 @@ "name" : "030" }, { - "name" : "029", "data" : [ [ "Perl", @@ -233,7 +240,8 @@ 12 ] ], - "id" : "029" + "id" : "029", + "name" : "029" }, { "name" : "028", @@ -254,7 +262,6 @@ "id" : "028" }, { - "id" : "027", "data" : [ [ "Perl", @@ -269,9 +276,12 @@ 9 ] ], + "id" : "027", "name" : "027" }, { + "name" : "026", + "id" : "026", "data" : [ [ "Perl", @@ -285,12 +295,11 @@ "Blog", 10 ] -