From f3bf9e7ddbab83a6725915f676f9bf9de35bc01f Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Mon, 12 Apr 2021 07:01:16 +0100 Subject: - Added template for week 108. --- challenge-108/3ter/README | 1 + challenge-108/LoneWolfiNTj/README | 1 + challenge-108/aaron-rowe/README | 1 + challenge-108/aaron-sherman/README | 1 + challenge-108/aaronreidsmith/README | 1 + challenge-108/abigail/README.md | 157 +++++++++++++++ challenge-108/adam-russell/README | 1 + challenge-108/ailbhe-tweedie/README | 1 + challenge-108/alex-daniel/README | 1 + challenge-108/alexander-karelas/README | 1 + challenge-108/alexander-pankoff/README | 1 + challenge-108/alicia-bielsa/README | 1 + challenge-108/andinus/README | 122 ++++++++++++ challenge-108/andinus/README.org | 102 ++++++++++ challenge-108/andrezgz/README | 1 + challenge-108/anton-fedotov/README | 1 + challenge-108/antonio-gamiz/README | 1 + challenge-108/arne-sommer/README | 1 + challenge-108/arpad-toth/README | 1 + challenge-108/ash/README | 1 + challenge-108/athanasius/README | 1 + challenge-108/aubrey-quarcoo/README | 1 + challenge-108/aviral-goel/README | 1 + challenge-108/ben-davies/README.md | 1 + challenge-108/bill-palmer/README | 1 + challenge-108/bkb/README | 1 + challenge-108/bob-kleemann/README | 1 + challenge-108/bob-lied/README | 3 + challenge-108/brtastic/README | 1 + challenge-108/bruno-ramos/README | 1 + challenge-108/burkhard-nickels/README | 1 + challenge-108/bwva/README | 1 + challenge-108/cheok-yin-fung/README | 1 + challenge-108/cliveholloway/README | 1 + challenge-108/colin-crain/README | 1 + challenge-108/craig/README | 1 + challenge-108/creewick/README | 1 + challenge-108/cristian-heredia/README | 1 + challenge-108/daniel-mantovani/README | 1 + challenge-108/daniel-mita/README | 1 + challenge-108/darren-bottin/README | 1 + challenge-108/dave-cross/README | 1 + challenge-108/dave-jacoby/README | 1 + challenge-108/david-kayal/README | 1 + challenge-108/ddobbelaere/README | 1 + challenge-108/deadmarshal/README | 1 + challenge-108/denis-yurashku/README | 1 + challenge-108/donald-hunter/README | 1 + challenge-108/doug-schrag/README | 1 + challenge-108/dracos/README | 1 + challenge-108/duane-powell/README | 1 + challenge-108/duncan-c-white/README | 65 +++++++ challenge-108/e-choroba/README | 1 + challenge-108/eddy-hs/README | 1 + challenge-108/fabrizio-poggi/README | 1 + challenge-108/feng-chang/README | 1 + challenge-108/finanalyst/README | 1 + challenge-108/finley/README | 1 + challenge-108/fjwhittle/README | 1 + challenge-108/frankivo/README | 1 + challenge-108/fred-zinn/README | 1 + challenge-108/freddie-b/README | 1 + challenge-108/garrett-goebel/README | 1 + challenge-108/giuseppe-terlizzi/README | 1 + challenge-108/gugod/README | 1 + challenge-108/gugod/rust/.gitignore | 2 + challenge-108/guillermo-ramos/README | 1 + challenge-108/gustavo-chaves/README | 1 + challenge-108/hatorikibble/README | 1 + challenge-108/hauke-d/README | 1 + challenge-108/henry-wong/README | 1 + challenge-108/hstejas/README | 1 + challenge-108/ianrifkin/README | 1 + challenge-108/izifresh/README | 1 + challenge-108/jacques-guinnebault/README | 1 + challenge-108/jaime/README | 59 ++++++ challenge-108/jaldhar-h-vyas/README | 1 + challenge-108/james-smith/README.md | 161 ++++++++++++++++ challenge-108/jan-perl/README | 1 + challenge-108/jaredor/README | 1 + challenge-108/jason-messer/README | 1 + challenge-108/javier-luque/README | 1 + challenge-108/jcrosswh/README | 1 + challenge-108/jeff/README | 1 + challenge-108/jeongoon/.gitignore | 5 + challenge-108/jeongoon/README | 1 + challenge-108/jeremy-carman/README | 1 + challenge-108/jim-bacon/README | 1 + challenge-108/jitu-keshwani/README | 1 + challenge-108/jj-merelo/README | 1 + challenge-108/jluis/README | 1 + challenge-108/jo-37/README | 1 + challenge-108/jo-christian-oterhals/README | 1 + challenge-108/joe-tym/README | 1 + challenge-108/joelle-maslak/README | 1 + challenge-108/john-barrett/README | 1 + challenge-108/jokraft/README | 1 + challenge-108/juan-caballero/README | 1 + challenge-108/julien-fiegehenn/README | 1 + challenge-108/juliodcs/README | 1 + challenge-108/kai-burgdorf/README.md | 1 + challenge-108/kevin-colyer/README | 3 + challenge-108/khalid/README | 1 + challenge-108/kian-meng-ang/README | 1 + challenge-108/kiran-kumar/README | 1 + challenge-108/kivanc-yazan/.gitignore | 2 + challenge-108/kivanc-yazan/README | 1 + challenge-108/kordaff/README | 1 + challenge-108/lance-wicks/README | 1 + challenge-108/lars-balker/README | 1 + challenge-108/lars-thegler/README | 1 + challenge-108/laurent-rosenfeld/README | 1 + challenge-108/leoltron/README | 1 + challenge-108/lubos-kolouch/README | 1 + challenge-108/luca-ferrari/README | 1 + challenge-108/magnus-woldrich/README | 1 + challenge-108/manfredi/README | 1 + challenge-108/mano-chandar/README | 1 + challenge-108/mark-anderson/README | 1 + challenge-108/mark-senn/README | 1 + challenge-108/markjreed/README | 6 + challenge-108/markus-holzer/README | 1 + challenge-108/martin-barth/README | 1 + challenge-108/martin-mugeni/README | 1 + challenge-108/mathmauney/README | 1 + challenge-108/matt-latusek/README | 1 + challenge-108/matthew-persico/README | 1 + challenge-108/maxim-kolodyazhny/README | 1 + challenge-108/maxim-nechaev/README | 1 + challenge-108/michael-hamlin/README | 5 + challenge-108/michael-schaap/README | 1 + challenge-108/mihail-iosilevitch/README | 1 + challenge-108/mike-accardo/README | 1 + challenge-108/mimosinnet/README | 1 + challenge-108/mohammad-anwar/README | 1 + challenge-108/ndelucca/README | 1 + challenge-108/neil-bowers/README | 1 + challenge-108/nick-logan/README | 1 + challenge-108/nikhil-prasanna/README | 1 + challenge-108/noud/README | 1 + challenge-108/nunovieira220/README | 1 + challenge-108/ohmycloud/README | 1 + challenge-108/oleksii-tsvietnov/README | 1 + challenge-108/olli-antti/README | 1 + challenge-108/orestis-zekai/README | 1 + challenge-108/ozzy/README | 1 + challenge-108/p6steve/README | 1 + challenge-108/pablo-saavedra/README | 1 + challenge-108/paulo-custodio/README | 1 + challenge-108/pavel-jurca/README | 1 + challenge-108/pavel-starikov/README | 1 + challenge-108/pavel_kuptsov/README | 2 + challenge-108/perlboy1967/README | 1 + challenge-108/pete-houston/README | 1 + challenge-108/pete-sergeant/README | 1 + challenge-108/peter-meszaros/README | 1 + challenge-108/peter-scott/README | 1 + challenge-108/petr-roubicek/README | 1 + challenge-108/philippe-bruhat/README | 1 + challenge-108/phillip-harris/README | 1 + challenge-108/pjdurai/README | 1 + challenge-108/pkmnx/README | 1 + challenge-108/plis-acm/.gitignore | 1 + challenge-108/plis-acm/README | 1 + challenge-108/polettix/README | 1 + challenge-108/polettix/perl/.gitignore | 1 + challenge-108/prajith-p/README | 1 + challenge-108/rage311/README | 1 + challenge-108/rakulius/README | 1 + challenge-108/randy-lauen/README | 1 + challenge-108/richard-park/README | 1 + challenge-108/rnuttall/README | 1 + challenge-108/rob-van-dam/README | 1 + challenge-108/rob4t/README | 1 + challenge-108/roger-bell-west/README | 1 + challenge-108/ruben-westerberg/README | 9 + challenge-108/ryan-thompson/README.md | 19 ++ challenge-108/saiftynet/README | 1 + challenge-108/samir-parikh/README | 1 + challenge-108/sangeet-kar/README | 1 + challenge-108/sean-meininger/README | 1 + challenge-108/sergiotarxz/README | 1 + challenge-108/sgreen/README.md | 3 + challenge-108/shahed-nooshmand/README | 1 + challenge-108/shardiwal/README | 1 + challenge-108/shaun-pearce/README | 1 + challenge-108/shawak/README.md | 1 + challenge-108/shawn-wagner/README | 1 + challenge-108/simon-miner/README | 1 + challenge-108/simon-proctor/README | 1 + challenge-108/simon-reinhardt/README | 1 + challenge-108/sol-demuth/README | 1 + challenge-108/southpawgeek/README | 1 + challenge-108/stephanie-stein/README | 1 + challenge-108/steve-rogerson/README | 1 + challenge-108/steven-lembark/README | 1 + challenge-108/steven-wilson/README | 1 + challenge-108/stuart-little/README | 1 + challenge-108/svetlana-nesterova/README | 1 + challenge-108/swaggboi/README | 1 + challenge-108/ted-leahy/README | 1 + challenge-108/testerR59/README | 1 + challenge-108/tiago-stock/README | 1 + challenge-108/tim-smith/README | 1 + challenge-108/tore-andersson/README | 1 + challenge-108/trenton-langer/README | 1 + challenge-108/tyler-limkemann/README | 1 + challenge-108/tyler-wardhaugh/README | 1 + challenge-108/tyler-wardhaugh/clojure/.gitignore | 16 ++ challenge-108/tyler-wardhaugh/clojure/LICENSE | 214 +++++++++++++++++++++ challenge-108/tyler-wardhaugh/clojure/README.md | 35 ++++ challenge-108/tyler-wardhaugh/clojure/deps.edn | 14 ++ challenge-108/tyler-wardhaugh/clojure/pom.xml | 50 +++++ .../tyler-wardhaugh/clojure/resources/.keep | 0 challenge-108/tyler-wardhaugh/lua/README.md | 23 +++ challenge-108/tyler-wardhaugh/python/.gitignore | 24 +++ challenge-108/tyler-wardhaugh/python/Makefile | 13 ++ challenge-108/tyler-wardhaugh/python/README.md | 29 +++ challenge-108/ulrich-rieke/README | 1 + challenge-108/user-person/README | 1 + challenge-108/uzluisf/README | 1 + challenge-108/veesh-goldman/README | 1 + challenge-108/vinod-k/README | 1 + challenge-108/vinod-pal/README | 1 + challenge-108/vyacheslav-volgarev/README | 1 + challenge-108/walt-mankowski/README.md | 58 ++++++ challenge-108/walt-mankowski/c/.gitignore | 2 + challenge-108/walt-mankowski/cpp/.gitignore | 2 + .../walt-mankowski/python/.python-version | 1 + challenge-108/wambash/README | 1 + challenge-108/wanderdoc/README | 1 + challenge-108/will-west/README | 1 + challenge-108/william-gilmore/README | 1 + challenge-108/wlmb/README | 1 + challenge-108/x1mandi/README | 1 + challenge-108/xkr47/README | 11 ++ challenge-108/xliff/README | 1 + challenge-108/yary-h/README | 1 + challenge-108/yet-ebreo/README | 1 + challenge-108/yozen-hernandez/README | 1 + challenge-108/ziameraj16/README.md | 50 +++++ .../ziameraj16/kotlin/META-INF/main.kotlin_module | Bin 0 -> 24 bytes 242 files changed, 1475 insertions(+) create mode 100644 challenge-108/3ter/README create mode 100755 challenge-108/LoneWolfiNTj/README create mode 100644 challenge-108/aaron-rowe/README create mode 100644 challenge-108/aaron-sherman/README create mode 100644 challenge-108/aaronreidsmith/README create mode 100644 challenge-108/abigail/README.md create mode 100644 challenge-108/adam-russell/README create mode 100644 challenge-108/ailbhe-tweedie/README create mode 100644 challenge-108/alex-daniel/README create mode 100644 challenge-108/alexander-karelas/README create mode 100644 challenge-108/alexander-pankoff/README create mode 100644 challenge-108/alicia-bielsa/README create mode 100644 challenge-108/andinus/README create mode 100644 challenge-108/andinus/README.org create mode 100644 challenge-108/andrezgz/README create mode 100644 challenge-108/anton-fedotov/README create mode 100644 challenge-108/antonio-gamiz/README create mode 100644 challenge-108/arne-sommer/README create mode 100644 challenge-108/arpad-toth/README create mode 100644 challenge-108/ash/README create mode 100644 challenge-108/athanasius/README create mode 100644 challenge-108/aubrey-quarcoo/README create mode 100644 challenge-108/aviral-goel/README create mode 100644 challenge-108/ben-davies/README.md create mode 100644 challenge-108/bill-palmer/README create mode 100644 challenge-108/bkb/README create mode 100644 challenge-108/bob-kleemann/README create mode 100644 challenge-108/bob-lied/README create mode 100644 challenge-108/brtastic/README create mode 100644 challenge-108/bruno-ramos/README create mode 100644 challenge-108/burkhard-nickels/README create mode 100644 challenge-108/bwva/README create mode 100644 challenge-108/cheok-yin-fung/README create mode 100644 challenge-108/cliveholloway/README create mode 100644 challenge-108/colin-crain/README create mode 100644 challenge-108/craig/README create mode 100644 challenge-108/creewick/README create mode 100644 challenge-108/cristian-heredia/README create mode 100644 challenge-108/daniel-mantovani/README create mode 100644 challenge-108/daniel-mita/README create mode 100644 challenge-108/darren-bottin/README create mode 100644 challenge-108/dave-cross/README create mode 100644 challenge-108/dave-jacoby/README create mode 100644 challenge-108/david-kayal/README create mode 100644 challenge-108/ddobbelaere/README create mode 100644 challenge-108/deadmarshal/README create mode 100644 challenge-108/denis-yurashku/README create mode 100644 challenge-108/donald-hunter/README create mode 100644 challenge-108/doug-schrag/README create mode 100644 challenge-108/dracos/README create mode 100644 challenge-108/duane-powell/README create mode 100644 challenge-108/duncan-c-white/README create mode 100644 challenge-108/e-choroba/README create mode 100644 challenge-108/eddy-hs/README create mode 100644 challenge-108/fabrizio-poggi/README create mode 100644 challenge-108/feng-chang/README create mode 100644 challenge-108/finanalyst/README create mode 100644 challenge-108/finley/README create mode 100644 challenge-108/fjwhittle/README create mode 100644 challenge-108/frankivo/README create mode 100644 challenge-108/fred-zinn/README create mode 100644 challenge-108/freddie-b/README create mode 100644 challenge-108/garrett-goebel/README create mode 100644 challenge-108/giuseppe-terlizzi/README create mode 100644 challenge-108/gugod/README create mode 100644 challenge-108/gugod/rust/.gitignore create mode 100644 challenge-108/guillermo-ramos/README create mode 100644 challenge-108/gustavo-chaves/README create mode 100644 challenge-108/hatorikibble/README create mode 100644 challenge-108/hauke-d/README create mode 100644 challenge-108/henry-wong/README create mode 100644 challenge-108/hstejas/README create mode 100644 challenge-108/ianrifkin/README create mode 100644 challenge-108/izifresh/README create mode 100644 challenge-108/jacques-guinnebault/README create mode 100644 challenge-108/jaime/README create mode 100644 challenge-108/jaldhar-h-vyas/README create mode 100644 challenge-108/james-smith/README.md create mode 100644 challenge-108/jan-perl/README create mode 100644 challenge-108/jaredor/README create mode 100644 challenge-108/jason-messer/README create mode 100644 challenge-108/javier-luque/README create mode 100644 challenge-108/jcrosswh/README create mode 100644 challenge-108/jeff/README create mode 100644 challenge-108/jeongoon/.gitignore create mode 100644 challenge-108/jeongoon/README create mode 100644 challenge-108/jeremy-carman/README create mode 100644 challenge-108/jim-bacon/README create mode 100644 challenge-108/jitu-keshwani/README create mode 100644 challenge-108/jj-merelo/README create mode 100644 challenge-108/jluis/README create mode 100644 challenge-108/jo-37/README create mode 100644 challenge-108/jo-christian-oterhals/README create mode 100644 challenge-108/joe-tym/README create mode 100644 challenge-108/joelle-maslak/README create mode 100644 challenge-108/john-barrett/README create mode 100644 challenge-108/jokraft/README create mode 100644 challenge-108/juan-caballero/README create mode 100644 challenge-108/julien-fiegehenn/README create mode 100644 challenge-108/juliodcs/README create mode 100644 challenge-108/kai-burgdorf/README.md create mode 100644 challenge-108/kevin-colyer/README create mode 100644 challenge-108/khalid/README create mode 100644 challenge-108/kian-meng-ang/README create mode 100644 challenge-108/kiran-kumar/README create mode 100644 challenge-108/kivanc-yazan/.gitignore create mode 100644 challenge-108/kivanc-yazan/README create mode 100644 challenge-108/kordaff/README create mode 100644 challenge-108/lance-wicks/README create mode 100644 challenge-108/lars-balker/README create mode 100644 challenge-108/lars-thegler/README create mode 100644 challenge-108/laurent-rosenfeld/README create mode 100644 challenge-108/leoltron/README create mode 100644 challenge-108/lubos-kolouch/README create mode 100644 challenge-108/luca-ferrari/README create mode 100644 challenge-108/magnus-woldrich/README create mode 100644 challenge-108/manfredi/README create mode 100644 challenge-108/mano-chandar/README create mode 100644 challenge-108/mark-anderson/README create mode 100644 challenge-108/mark-senn/README create mode 100644 challenge-108/markjreed/README create mode 100644 challenge-108/markus-holzer/README create mode 100644 challenge-108/martin-barth/README create mode 100644 challenge-108/martin-mugeni/README create mode 100644 challenge-108/mathmauney/README create mode 100644 challenge-108/matt-latusek/README create mode 100644 challenge-108/matthew-persico/README create mode 100644 challenge-108/maxim-kolodyazhny/README create mode 100644 challenge-108/maxim-nechaev/README create mode 100644 challenge-108/michael-hamlin/README create mode 100644 challenge-108/michael-schaap/README create mode 100644 challenge-108/mihail-iosilevitch/README create mode 100644 challenge-108/mike-accardo/README create mode 100644 challenge-108/mimosinnet/README create mode 100644 challenge-108/mohammad-anwar/README create mode 100644 challenge-108/ndelucca/README create mode 100644 challenge-108/neil-bowers/README create mode 100644 challenge-108/nick-logan/README create mode 100644 challenge-108/nikhil-prasanna/README create mode 100644 challenge-108/noud/README create mode 100644 challenge-108/nunovieira220/README create mode 100644 challenge-108/ohmycloud/README create mode 100644 challenge-108/oleksii-tsvietnov/README create mode 100644 challenge-108/olli-antti/README create mode 100644 challenge-108/orestis-zekai/README create mode 100644 challenge-108/ozzy/README create mode 100644 challenge-108/p6steve/README create mode 100644 challenge-108/pablo-saavedra/README create mode 100644 challenge-108/paulo-custodio/README create mode 100644 challenge-108/pavel-jurca/README create mode 100644 challenge-108/pavel-starikov/README create mode 100644 challenge-108/pavel_kuptsov/README create mode 100644 challenge-108/perlboy1967/README create mode 100644 challenge-108/pete-houston/README create mode 100644 challenge-108/pete-sergeant/README create mode 100644 challenge-108/peter-meszaros/README create mode 100644 challenge-108/peter-scott/README create mode 100644 challenge-108/petr-roubicek/README create mode 100644 challenge-108/philippe-bruhat/README create mode 100644 challenge-108/phillip-harris/README create mode 100644 challenge-108/pjdurai/README create mode 100644 challenge-108/pkmnx/README create mode 100644 challenge-108/plis-acm/.gitignore create mode 100644 challenge-108/plis-acm/README create mode 100644 challenge-108/polettix/README create mode 100644 challenge-108/polettix/perl/.gitignore create mode 100644 challenge-108/prajith-p/README create mode 100644 challenge-108/rage311/README create mode 100644 challenge-108/rakulius/README create mode 100644 challenge-108/randy-lauen/README create mode 100644 challenge-108/richard-park/README create mode 100644 challenge-108/rnuttall/README create mode 100644 challenge-108/rob-van-dam/README create mode 100644 challenge-108/rob4t/README create mode 100644 challenge-108/roger-bell-west/README create mode 100644 challenge-108/ruben-westerberg/README create mode 100644 challenge-108/ryan-thompson/README.md create mode 100644 challenge-108/saiftynet/README create mode 100644 challenge-108/samir-parikh/README create mode 100644 challenge-108/sangeet-kar/README create mode 100644 challenge-108/sean-meininger/README create mode 100644 challenge-108/sergiotarxz/README create mode 100644 challenge-108/sgreen/README.md create mode 100644 challenge-108/shahed-nooshmand/README create mode 100644 challenge-108/shardiwal/README create mode 100644 challenge-108/shaun-pearce/README create mode 100644 challenge-108/shawak/README.md create mode 100644 challenge-108/shawn-wagner/README create mode 100644 challenge-108/simon-miner/README create mode 100644 challenge-108/simon-proctor/README create mode 100644 challenge-108/simon-reinhardt/README create mode 100644 challenge-108/sol-demuth/README create mode 100644 challenge-108/southpawgeek/README create mode 100644 challenge-108/stephanie-stein/README create mode 100644 challenge-108/steve-rogerson/README create mode 100644 challenge-108/steven-lembark/README create mode 100644 challenge-108/steven-wilson/README create mode 100644 challenge-108/stuart-little/README create mode 100644 challenge-108/svetlana-nesterova/README create mode 100644 challenge-108/swaggboi/README create mode 100644 challenge-108/ted-leahy/README create mode 100644 challenge-108/testerR59/README create mode 100644 challenge-108/tiago-stock/README create mode 100644 challenge-108/tim-smith/README create mode 100644 challenge-108/tore-andersson/README create mode 100644 challenge-108/trenton-langer/README create mode 100644 challenge-108/tyler-limkemann/README create mode 100644 challenge-108/tyler-wardhaugh/README create mode 100644 challenge-108/tyler-wardhaugh/clojure/.gitignore create mode 100644 challenge-108/tyler-wardhaugh/clojure/LICENSE create mode 100644 challenge-108/tyler-wardhaugh/clojure/README.md create mode 100644 challenge-108/tyler-wardhaugh/clojure/deps.edn create mode 100644 challenge-108/tyler-wardhaugh/clojure/pom.xml create mode 100644 challenge-108/tyler-wardhaugh/clojure/resources/.keep create mode 100644 challenge-108/tyler-wardhaugh/lua/README.md create mode 100644 challenge-108/tyler-wardhaugh/python/.gitignore create mode 100644 challenge-108/tyler-wardhaugh/python/Makefile create mode 100644 challenge-108/tyler-wardhaugh/python/README.md create mode 100644 challenge-108/ulrich-rieke/README create mode 100644 challenge-108/user-person/README create mode 100644 challenge-108/uzluisf/README create mode 100644 challenge-108/veesh-goldman/README create mode 100644 challenge-108/vinod-k/README create mode 100644 challenge-108/vinod-pal/README create mode 100644 challenge-108/vyacheslav-volgarev/README create mode 100644 challenge-108/walt-mankowski/README.md create mode 100644 challenge-108/walt-mankowski/c/.gitignore create mode 100644 challenge-108/walt-mankowski/cpp/.gitignore create mode 100644 challenge-108/walt-mankowski/python/.python-version create mode 100644 challenge-108/wambash/README create mode 100644 challenge-108/wanderdoc/README create mode 100644 challenge-108/will-west/README create mode 100644 challenge-108/william-gilmore/README create mode 100644 challenge-108/wlmb/README create mode 100644 challenge-108/x1mandi/README create mode 100644 challenge-108/xkr47/README create mode 100644 challenge-108/xliff/README create mode 100644 challenge-108/yary-h/README create mode 100644 challenge-108/yet-ebreo/README create mode 100644 challenge-108/yozen-hernandez/README create mode 100644 challenge-108/ziameraj16/README.md create mode 100644 challenge-108/ziameraj16/kotlin/META-INF/main.kotlin_module (limited to 'challenge-108') diff --git a/challenge-108/3ter/README b/challenge-108/3ter/README new file mode 100644 index 0000000000..8c594431f3 --- /dev/null +++ b/challenge-108/3ter/README @@ -0,0 +1 @@ +Solutions by 3ter. diff --git a/challenge-108/LoneWolfiNTj/README b/challenge-108/LoneWolfiNTj/README new file mode 100755 index 0000000000..bf42ad2482 --- /dev/null +++ b/challenge-108/LoneWolfiNTj/README @@ -0,0 +1 @@ +Solution by Robbie Hatley (github user "LoneWolfiNTj"). \ No newline at end of file diff --git a/challenge-108/aaron-rowe/README b/challenge-108/aaron-rowe/README new file mode 100644 index 0000000000..e14e0782fb --- /dev/null +++ b/challenge-108/aaron-rowe/README @@ -0,0 +1 @@ +Solutions by Aaron Rowe. diff --git a/challenge-108/aaron-sherman/README b/challenge-108/aaron-sherman/README new file mode 100644 index 0000000000..14ec31f570 --- /dev/null +++ b/challenge-108/aaron-sherman/README @@ -0,0 +1 @@ +Solutions by Aaron Sherman. diff --git a/challenge-108/aaronreidsmith/README b/challenge-108/aaronreidsmith/README new file mode 100644 index 0000000000..2fcfe1fdcc --- /dev/null +++ b/challenge-108/aaronreidsmith/README @@ -0,0 +1 @@ +Solution by Aaron Smith diff --git a/challenge-108/abigail/README.md b/challenge-108/abigail/README.md new file mode 100644 index 0000000000..67392c9e54 --- /dev/null +++ b/challenge-108/abigail/README.md @@ -0,0 +1,157 @@ +# Solution by Abigail +## [Self-descriptive Numbers](https://perlweeklychallenge.org/blog/perl-weekly-challenge-107/#TASK1) + +Write a script to display the first three self-descriptive numbers. +As per [wikipedia](https://en.wikipedia.org/wiki/Self-descriptive_number), +the definition of Self-descriptive Number is + +> In mathematics, a self-descriptive number is an integer `m` that in a +> given base `b` is `b` digits long in which each digit `d` at position `n` +> (the most significant digit being at position 0 and the least +> significant at position `b - 1`) counts how many instances of +> digit `n` are in `m`. + +### Example +~~~~ + 1210 is a four-digit self-descriptive number: + + position 0 has value 1 i.e. there is only one 0 in the number + position 1 has value 2 i.e. there are two 1 in the number + position 2 has value 1 i.e. there is only one 2 in the number + position 3 has value 0 i.e. there is no 3 in the number +~~~~ + +### Output +~~~~ + 1210, 2020, 21200 +~~~~ + +### Notes + +This is a trivial exercise -- as all exercises are which do not +take any input, and which have a fixed output. Fixed output +challenges are boring -- unless there's another condition (golf, +for instance). + +This exercise is so trivial, we don't even have to head to the OEIS +to download the wanted numbers, as the expected output is stated +in the exercise. + +So, all we need to do is print three numbers, separated by commas. + +The easiest way would be to just do what the challenge demands +from us, and print the output as given. + +A slightly less easy way would be to head over the given +[Wikipedia page](https://en.wikipedia.org/wiki/Self-descriptive_number) +(or the [OEIS](https://oeis.org) for that matter), copy the first +three numbers, and print those out. + +But those solutions no doubt will cause scorn in two weeks, +when the review comes out. It's all "advice about the code is the thing". + +But that raises the question, what is the code which is wanted? +You could generate all the numbers of length `b` in base `b`, while +increasing `b`, test them for being self-descriptive, and print +the first three numbers found. + +My advice about brute force code when there is a more efficient way: +Don't ever do that. + +If we just imagine the Wikipedia page didn't list any self-descriptive +numbers, and Neil Sloane has forgotten to pay the fee for the OEIS +domain, so it was taken off-line, then it's still easy to determine +the first three self-descriptive numbers -- no code required. + +Given the following observations for a self-descriptive number `N` in base `b`: +* `N` has `b` digits, and does not start with a `0`. +* The sum of the digits of `N` is `b`. +* No digit of `N` equals `b - 1`. +* The last digit of `N` is `0`. +* If `b > 4`, then `N` does not start with a `1`. +* If `b > 4`, then `N` does not start with `b - 2`. + +From that, it's easy to determine that: +* There are no self-descriptive numbers in any base below `4`. +* A self-descriptive number in base `4` must start with a `1` or `2`. And + end with a `0`. If it starts with a `1`, the middle digits are `1` and `2`. + If it starts with a `2`, the middle digits are `0` and `2`. Both `1210`, + and `2020"`are self-descriptive numbers. +* A self-descriptive number in base `5` must start with a `2`, and end + with a `0`. The three middle digits must be `0`, `1`, and `2`. `21200` + is a self-descriptive number. + +(For a more detailed derivation, with all the details filled in, see [the blog +post](https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-107-1.html)) + +But this still makes this challenge a glorified `Hello, World!` +program, as there is no useful code to write to generate the numbers. + +### Solutions +* [AWK](awk/ch-1.awk) +* [Bash](bash/ch-1.awk) +* [BASIC](basic/ch-1.bas) +* [bc](bc/ch-1.bc) +* [Befunge-93](befunge-93/ch-1.bf93) +* [C](c/ch-1.c) +* [Cobol](cobol/ch-1.cb) +* [Csh](csh/ch-1.csh) +* [Erlang](erlang/ch-1.erl) +* [Forth](forth/ch-1.fs) +* [Fortran](fortran/ch-1.fs) +* [Go](go/ch-1.go) +* [Java](java/ch-1.java) +* [Lua](lua/ch-1.lua) +* [m4](m4/ch-1.m4) +* [Node.js](lua/ch-1.js) +* [OCaml](ocaml/ch-1.ml) +* [Pascal](pascal/ch-1.pl) +* [Perl](perl/ch-1.pl) +* [PHP](php/ch-1.pl) +* [PostScript](postscript/ch-1.ps) +* [Python](python/ch-1.py) +* [R](r/ch-1.r) +* [Rexx](rexx/ch-1.rexx) +* [Ruby](ruby/ch-1.rb) +* [Scheme](scheme/ch-1.scm) +* [sed](sed/ch-1.sed) +* [SQL](sql/ch-1.sql) +* [Tcl](tcl/ch-1.tcl) + +### Blog +[Perl Weekly Challenge 107: Self-descriptive Numbers](https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-107-1.html) + +## [List Methods](https://perlweeklychallenge.org/blog/perl-weekly-challenge-107/#TASK2) + +Write a script to list methods of a package/class. + +### Example +Given the package: +~~~~ +package Calc; + +use strict; +use warnings; + +sub new { bless {}, shift; } +sub add { } +sub mul { } +sub div { } + +1; +~~~~ +Output: +~~~~ +BEGIN +mul +div +new +add +~~~~ + +### Solutions +* [Perl](perl/ch-2.pl) + +### Blog +[Perl Weekly Challenge 107: List Methods](https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-107-2.html) + diff --git a/challenge-108/adam-russell/README b/challenge-108/adam-russell/README new file mode 100644 index 0000000000..1d2e2957c5 --- /dev/null +++ b/challenge-108/adam-russell/README @@ -0,0 +1 @@ +Solution by Adam Russell diff --git a/challenge-108/ailbhe-tweedie/README b/challenge-108/ailbhe-tweedie/README new file mode 100644 index 0000000000..36d4034b70 --- /dev/null +++ b/challenge-108/ailbhe-tweedie/README @@ -0,0 +1 @@ +Solution by Ailbhe Tweedie diff --git a/challenge-108/alex-daniel/README b/challenge-108/alex-daniel/README new file mode 100644 index 0000000000..65550789bd --- /dev/null +++ b/challenge-108/alex-daniel/README @@ -0,0 +1 @@ +Solution by Alex Daniel. diff --git a/challenge-108/alexander-karelas/README b/challenge-108/alexander-karelas/README new file mode 100644 index 0000000000..3de9fce8d9 --- /dev/null +++ b/challenge-108/alexander-karelas/README @@ -0,0 +1 @@ +Solution by Alexander Karelas diff --git a/challenge-108/alexander-pankoff/README b/challenge-108/alexander-pankoff/README new file mode 100644 index 0000000000..41f67807ac --- /dev/null +++ b/challenge-108/alexander-pankoff/README @@ -0,0 +1 @@ +Solution by Alexander Pankoff diff --git a/challenge-108/alicia-bielsa/README b/challenge-108/alicia-bielsa/README new file mode 100644 index 0000000000..c5187874c3 --- /dev/null +++ b/challenge-108/alicia-bielsa/README @@ -0,0 +1 @@ +Solution by Alicia Beilsa. diff --git a/challenge-108/andinus/README b/challenge-108/andinus/README new file mode 100644 index 0000000000..3113a6fd55 --- /dev/null +++ b/challenge-108/andinus/README @@ -0,0 +1,122 @@ + ━━━━━━━━━━━━━━━ + CHALLENGE 100 + + Andinus + ━━━━━━━━━━━━━━━ + + + 2021-02-20 + + +Table of Contents +───────────────── + +Task 1 - Fun Time +.. Raku + + + + + +Task 1 - Fun Time +═════════════════ + + You are given a time (12 hour / 24 hour). + + Write a script to convert the given time from 12 hour format to 24 + hour format and vice versa. + + Ideally we expect a one-liner. + + +Raku +──── + + • Program: + + One should use `DateTime' module to solve this but that is not fun so + we solve it the wrong way! + + The program will accept any string as `$time'. We do the format check + later. + + ┌──── + │ #| convert 12-hour formatted time to 24-hour format and vice-versa + │ unit sub MAIN ( + │ Str $time, #= time (format: 05:15pm or "05:15 pm" or 17:00) + │ ); + └──── + + The grammar `Time' will parse `$time' to give us meaningful + information required to do the task. + + ⁃ `hour' & `minute' match any digit ranging from 00 to 99 + ⁃ `meridiem' matches either /am/ or /pm/ + + ⁃ Note: This grammar will consider "99:99" as a valid timestamp. + + ┌──── + │ grammar Time { + │ token TOP { ':' ' '? ? } + │ token hour { \d ** 1..2 } + │ token minute { \d ** 1..2 } + │ token meridiem { ['am'|'pm'] } + │ } + └──── + + We parse `$time' with `Time' grammar. If `meridiem' is set then it + must be 12-hour format time, otherwise it'll be 24-hour format time. + + ┌──── + │ # Match for time format. + │ if Time.parse($time) -> $m { + │ given $m { + │ ... + │ } + │ } else { + │ note "Wrong format!"; + │ exit 1; + │ } + └──── + + For "am" we just check if the hour is 12, if so then we print it as + "00" otherwise just print the hour. + + ┌──── + │ when 'am' { + │ printf "%02d:%02d\n", + │ $m == 12 ?? "00" !! $m, + │ $m; + │ } + └──── + + If the hour is < 12 then we print `hour + 12' otherwise just print the + hour. + + ┌──── + │ when 'pm' { + │ printf "%02d:%02d\n", + │ $m < 12 ?? $m + 12 !! $m, + │ $m; + │ } + └──── + + If the hour is 0 then print 12 otherwise check if it's > 12, if so + then print `hour - 12' otherwise just print the hour. + + 23 -> 11 + greater than 12 + 00 -> 12 + equal to 0 + 12 -> 12 + neither equal to 0, nor greater than 12 + + If the hour is < 12 then print "am" otherwise print "pm". + + ┌──── + │ default { + │ printf "%02d:%02d%s\n", + │ $m == 0 ?? "12" !! $m > 12 ?? $m - 12 !! $m, + │ $m, $m < 12 ?? "am" !! "pm"; + │ } + └──── diff --git a/challenge-108/andinus/README.org b/challenge-108/andinus/README.org new file mode 100644 index 0000000000..9fe366c58c --- /dev/null +++ b/challenge-108/andinus/README.org @@ -0,0 +1,102 @@ +#+title: Challenge 100 +#+date: 2021-02-20 +#+options: toc:2 +#+html_link_up: ../index.html +#+export_file_name: index +#+setupfile: ~/.emacs.d/org-templates/level-2.org + +* Task 1 - Fun Time + +You are given a time (12 hour / 24 hour). + +Write a script to convert the given time from 12 hour format to 24 hour +format and vice versa. + +Ideally we expect a one-liner. + +** Raku + +- Program: [[file:raku/ch-1.raku]] + +One should use ~DateTime~ module to solve this but that is not fun so we +solve it the wrong way! + +The program will accept any string as ~$time~. We do the format check later. + +#+begin_src raku +#| convert 12-hour formatted time to 24-hour format and vice-versa +unit sub MAIN ( + Str $time, #= time (format: 05:15pm or "05:15 pm" or 17:00) +); +#+end_src + +The grammar ~Time~ will parse ~$time~ to give us meaningful information +required to do the task. + ++ ~hour~ & ~minute~ match any digit ranging from 00 to 99 ++ ~meridiem~ matches either /am/ or /pm/ + ++ *Note*: This grammar will consider "99:99" as a valid timestamp. + +#+begin_src raku +grammar Time { + token TOP { ':' ' '? ? } + token hour { \d ** 1..2 } + token minute { \d ** 1..2 } + token meridiem { ['am'|'pm'] } +} +#+end_src + +We parse ~$time~ with ~Time~ grammar. If ~meridiem~ is set then it must be +12-hour format time, otherwise it'll be 24-hour format time. + +#+begin_src raku +# Match for time format. +if Time.parse($time) -> $m { + given $m { + ... + } +} else { + note "Wrong format!"; + exit 1; +} +#+end_src + +For "am" we just check if the hour is 12, if so then we print it as "00" +otherwise just print the hour. + +#+begin_src raku +when 'am' { + printf "%02d:%02d\n", + $m == 12 ?? "00" !! $m, + $m; +} +#+end_src + +If the hour is < 12 then we print =hour + 12= otherwise just print the +hour. + +#+begin_src raku +when 'pm' { + printf "%02d:%02d\n", + $m < 12 ?? $m + 12 !! $m, + $m; +} +#+end_src + +If the hour is 0 then print 12 otherwise check if it's > 12, if so then +print =hour - 12= otherwise just print the hour. + ++ 23 -> 11 :: greater than 12 ++ 00 -> 12 :: equal to 0 ++ 12 -> 12 :: neither equal to 0, nor greater than 12 + +If the hour is < 12 then print "am" otherwise print "pm". + +#+begin_src raku +default { + printf "%02d:%02d%s\n", + $m == 0 ?? "12" !! $m > 12 ?? $m - 12 !! $m, + $m, $m < 12 ?? "am" !! "pm"; +} +#+end_src diff --git a/challenge-108/andrezgz/README b/challenge-108/andrezgz/README new file mode 100644 index 0000000000..f4fd0da88e --- /dev/null +++ b/challenge-108/andrezgz/README @@ -0,0 +1 @@ +Solution by Andrezgz diff --git a/challenge-108/anton-fedotov/README b/challenge-108/anton-fedotov/README new file mode 100644 index 0000000000..f7c4f6deed --- /dev/null +++ b/challenge-108/anton-fedotov/README @@ -0,0 +1 @@ +Solutions by Anton Fedotov. diff --git a/challenge-108/antonio-gamiz/README b/challenge-108/antonio-gamiz/README new file mode 100644 index 0000000000..1f5ed5871a --- /dev/null +++ b/challenge-108/antonio-gamiz/README @@ -0,0 +1 @@ +Solution by Antonio Gamiz diff --git a/challenge-108/arne-sommer/README b/challenge-108/arne-sommer/README new file mode 100644 index 0000000000..b5d88e4df4 --- /dev/null +++ b/challenge-108/arne-sommer/README @@ -0,0 +1 @@ +Solution by Arne Sommer. diff --git a/challenge-108/arpad-toth/README b/challenge-108/arpad-toth/README new file mode 100644 index 0000000000..6661dd82c1 --- /dev/null +++ b/challenge-108/arpad-toth/README @@ -0,0 +1 @@ +Solution by Arpad Toth diff --git a/challenge-108/ash/README b/challenge-108/ash/README new file mode 100644 index 0000000000..318b1bfb41 --- /dev/null +++ b/challenge-108/ash/README @@ -0,0 +1 @@ +Solutions by Andrew Shitov diff --git a/challenge-108/athanasius/README b/challenge-108/athanasius/README new file mode 100644 index 0000000000..cc357fda4a --- /dev/null +++ b/challenge-108/athanasius/README @@ -0,0 +1 @@ +Solution by Athanasius diff --git a/challenge-108/aubrey-quarcoo/README b/challenge-108/aubrey-quarcoo/README new file mode 100644 index 0000000000..8e63a2c1f5 --- /dev/null +++ b/challenge-108/aubrey-quarcoo/README @@ -0,0 +1 @@ +Solution by Aubrey Quarcoo diff --git a/challenge-108/aviral-goel/README b/challenge-108/aviral-goel/README new file mode 100644 index 0000000000..e64ee14512 --- /dev/null +++ b/challenge-108/aviral-goel/README @@ -0,0 +1 @@ +Solutions by Aviral Goel. diff --git a/challenge-108/ben-davies/README.md b/challenge-108/ben-davies/README.md new file mode 100644 index 0000000000..77158344c9 --- /dev/null +++ b/challenge-108/ben-davies/README.md @@ -0,0 +1 @@ +Solution by Ben Davies diff --git a/challenge-108/bill-palmer/README b/challenge-108/bill-palmer/README new file mode 100644 index 0000000000..08ec849a41 --- /dev/null +++ b/challenge-108/bill-palmer/README @@ -0,0 +1 @@ +Solution by Bill Palmer. diff --git a/challenge-108/bkb/README b/challenge-108/bkb/README new file mode 100644 index 0000000000..4721993bb3 --- /dev/null +++ b/challenge-108/bkb/README @@ -0,0 +1 @@ +Solution by Ben Bullock. diff --git a/challenge-108/bob-kleemann/README b/challenge-108/bob-kleemann/README new file mode 100644 index 0000000000..78680e4035 --- /dev/null +++ b/challenge-108/bob-kleemann/README @@ -0,0 +1 @@ +Solution by Bob Kleemann diff --git a/challenge-108/bob-lied/README b/challenge-108/bob-lied/README new file mode 100644 index 0000000000..8417e3a7f7 --- /dev/null +++ b/challenge-108/bob-lied/README @@ -0,0 +1,3 @@ +Solutions to weekly challenge 103 by Bob Lied. + +https://perlweeklychallenge.org/blog/perl-weekly-challenge-103/ diff --git a/challenge-108/brtastic/README b/challenge-108/brtastic/README new file mode 100644 index 0000000000..0fbe79fd6f --- /dev/null +++ b/challenge-108/brtastic/README @@ -0,0 +1 @@ +Solutions by Bartosz Jarzyna. diff --git a/challenge-108/bruno-ramos/README b/challenge-108/bruno-ramos/README new file mode 100644 index 0000000000..9d631dad8f --- /dev/null +++ b/challenge-108/bruno-ramos/README @@ -0,0 +1 @@ +Solutions by Bruno Ramos. diff --git a/challenge-108/burkhard-nickels/README b/challenge-108/burkhard-nickels/README new file mode 100644 index 0000000000..f5e16bb98b --- /dev/null +++ b/challenge-108/burkhard-nickels/README @@ -0,0 +1 @@ +Solutions by Burkhard Nickels. diff --git a/challenge-108/bwva/README b/challenge-108/bwva/README new file mode 100644 index 0000000000..ee6a7d7dc1 --- /dev/null +++ b/challenge-108/bwva/README @@ -0,0 +1 @@ +Solution(s) by bwva (Bruce Van Allen) diff --git a/challenge-108/cheok-yin-fung/README b/challenge-108/cheok-yin-fung/README new file mode 100644 index 0000000000..4413b13ada --- /dev/null +++ b/challenge-108/cheok-yin-fung/README @@ -0,0 +1 @@ +Solutions by Cheok-Yin Fung. diff --git a/challenge-108/cliveholloway/README b/challenge-108/cliveholloway/README new file mode 100644 index 0000000000..b69201296e --- /dev/null +++ b/challenge-108/cliveholloway/README @@ -0,0 +1 @@ +Solution by Clive Holloway diff --git a/challenge-108/colin-crain/README b/challenge-108/colin-crain/README new file mode 100644 index 0000000000..2a5d87e97d --- /dev/null +++ b/challenge-108/colin-crain/README @@ -0,0 +1 @@ +Solutions by Colin Crain. diff --git a/challenge-108/craig/README b/challenge-108/craig/README new file mode 100644 index 0000000000..18088481eb --- /dev/null +++ b/challenge-108/craig/README @@ -0,0 +1 @@ +Solutions by Craig. diff --git a/challenge-108/creewick/README b/challenge-108/creewick/README new file mode 100644 index 0000000000..c490e4fb80 --- /dev/null +++ b/challenge-108/creewick/README @@ -0,0 +1 @@ +Solutions by Creewick. diff --git a/challenge-108/cristian-heredia/README b/challenge-108/cristian-heredia/README new file mode 100644 index 0000000000..c53da8a54c --- /dev/null +++ b/challenge-108/cristian-heredia/README @@ -0,0 +1 @@ +Solutions by Cristina Heredia. diff --git a/challenge-108/daniel-mantovani/README b/challenge-108/daniel-mantovani/README new file mode 100644 index 0000000000..ed538216f2 --- /dev/null +++ b/challenge-108/daniel-mantovani/README @@ -0,0 +1 @@ +Solution by Daniel Mantovani diff --git a/challenge-108/daniel-mita/README b/challenge-108/daniel-mita/README new file mode 100644 index 0000000000..37339f491f --- /dev/null +++ b/challenge-108/daniel-mita/README @@ -0,0 +1 @@ +Solution by Daniel Mita diff --git a/challenge-108/darren-bottin/README b/challenge-108/darren-bottin/README new file mode 100644 index 0000000000..6c792afe8e --- /dev/null +++ b/challenge-108/darren-bottin/README @@ -0,0 +1 @@ +Solutions by Darren Bottin. diff --git a/challenge-108/dave-cross/README b/challenge-108/dave-cross/README new file mode 100644 index 0000000000..04b1b0623b --- /dev/null +++ b/challenge-108/dave-cross/README @@ -0,0 +1 @@ +Solution by Dave Cross diff --git a/challenge-108/dave-jacoby/README b/challenge-108/dave-jacoby/README new file mode 100644 index 0000000000..7c06689f16 --- /dev/null +++ b/challenge-108/dave-jacoby/README @@ -0,0 +1 @@ +Solution by Dave Jacoby diff --git a/challenge-108/david-kayal/README b/challenge-108/david-kayal/README new file mode 100644 index 0000000000..66f8615260 --- /dev/null +++ b/challenge-108/david-kayal/README @@ -0,0 +1 @@ +Solution by David Kayal diff --git a/challenge-108/ddobbelaere/README b/challenge-108/ddobbelaere/README new file mode 100644 index 0000000000..36f8cdcd67 --- /dev/null +++ b/challenge-108/ddobbelaere/README @@ -0,0 +1 @@ +Solution by Dieter Dobbelaere diff --git a/challenge-108/deadmarshal/README b/challenge-108/deadmarshal/README new file mode 100644 index 0000000000..243097dede --- /dev/null +++ b/challenge-108/deadmarshal/README @@ -0,0 +1 @@ +Solution by Ali Moradi \ No newline at end of file diff --git a/challenge-108/denis-yurashku/README b/challenge-108/denis-yurashku/README new file mode 100644 index 0000000000..2fea994000 --- /dev/null +++ b/challenge-108/denis-yurashku/README @@ -0,0 +1 @@ +Solutions by Denis Yurashku. diff --git a/challenge-108/donald-hunter/README b/challenge-108/donald-hunter/README new file mode 100644 index 0000000000..2eef878f17 --- /dev/null +++ b/challenge-108/donald-hunter/README @@ -0,0 +1 @@ +Solutions by Donald Hunter. diff --git a/challenge-108/doug-schrag/README b/challenge-108/doug-schrag/README new file mode 100644 index 0000000000..bf8a10ffb4 --- /dev/null +++ b/challenge-108/doug-schrag/README @@ -0,0 +1 @@ +Solution by Doug Schrag diff --git a/challenge-108/dracos/README b/challenge-108/dracos/README new file mode 100644 index 0000000000..a9a6517a03 --- /dev/null +++ b/challenge-108/dracos/README @@ -0,0 +1 @@ +Solutions by Matthew Somerville. diff --git a/challenge-108/duane-powell/README b/challenge-108/duane-powell/README new file mode 100644 index 0000000000..3445422743 --- /dev/null +++ b/challenge-108/duane-powell/README @@ -0,0 +1 @@ +Solutions by Duane Powell. diff --git a/challenge-108/duncan-c-white/README b/challenge-108/duncan-c-white/README new file mode 100644 index 0000000000..4073520658 --- /dev/null +++ b/challenge-108/duncan-c-white/README @@ -0,0 +1,65 @@ +Task 1: "Self-descriptive Numbers + +Write a script to display the first three self-descriptive numbers. As per wikipedia, the definition of Self-descriptive Number is + + In mathematics, a self-descriptive number is an integer m that in a + given base b is b digits long in which each digit d at position n (the + most significant digit being at position 0 and the least significant + at position b-1) counts how many instances of digit n are in m. + +For example: + + 1210 is a four-digit self-descriptive number: + + position 0 has value 1 i.e. there is only one 0 in the number + position 1 has value 2 i.e. there are two 1 in the number + position 2 has value 1 i.e. there is only one 2 in the number + position 3 has value 0 i.e. there is no 3 in the number + +Output + + 1210, 2020, 21200 + +WARNING: I realised just before the launch this task was also part of the week +43 and contributed by Laurent Rosenfeld. It is too late to change now. Feel +free to share your previous solutions if you took part in the week 43 +already. I should have been more carefull, sorry. +" + +My notes: well, as it happened I skipped task 43, so let's have a go. The +important thing is: number of digits == base, which puts extra constraints +on the digits. So try bases b = 2.. try all base b numbers for "self- +descriptiveness" and then and stop after finding the first N self-descriptive +numbers. Let's take N as a command line input for generality, default 3. + + +Task 2: "List Methods + +Write a script to list methods of a package/class. + +Example + +package Calc; + +use strict; +use warnings; + +sub new { bless {}, shift; } +sub add { } +sub mul { } +sub div { } + +1; + +Output + +BEGIN +mul +div +new +add +" + +My notes: hmm, introspection. I genuinely can't remember how to do this +without a but of googling. Isn't there a symbol table hash per package, +that Memoize manipulates? Ah yes: the stash containing typeglobs. diff --git a/challenge-108/e-choroba/README b/challenge-108/e-choroba/README new file mode 100644 index 0000000000..efff637bcb --- /dev/null +++ b/challenge-108/e-choroba/README @@ -0,0 +1 @@ +Solutions by E. Choroba. diff --git a/challenge-108/eddy-hs/README b/challenge-108/eddy-hs/README new file mode 100644 index 0000000000..0ed51d222d --- /dev/null +++ b/challenge-108/eddy-hs/README @@ -0,0 +1 @@ +Solution by Eddy HS diff --git a/challenge-108/fabrizio-poggi/README b/challenge-108/fabrizio-poggi/README new file mode 100644 index 0000000000..3c17b29182 --- /dev/null +++ b/challenge-108/fabrizio-poggi/README @@ -0,0 +1 @@ +Solutions by Fabrizio Poggi. diff --git a/challenge-108/feng-chang/README b/challenge-108/feng-chang/README new file mode 100644 index 0000000000..74e56de3ed --- /dev/null +++ b/challenge-108/feng-chang/README @@ -0,0 +1 @@ +Solutions by Feng Chang. diff --git a/challenge-108/finanalyst/README b/challenge-108/finanalyst/README new file mode 100644 index 0000000000..15f7652e32 --- /dev/null +++ b/challenge-108/finanalyst/README @@ -0,0 +1 @@ +Solution by Richard Hainsworth, aka finanalyst diff --git a/challenge-108/finley/README b/challenge-108/finley/README new file mode 100644 index 0000000000..f08a121076 --- /dev/null +++ b/challenge-108/finley/README @@ -0,0 +1 @@ +Solution by Finley diff --git a/challenge-108/fjwhittle/README b/challenge-108/fjwhittle/README new file mode 100644 index 0000000000..7dcc95e189 --- /dev/null +++ b/challenge-108/fjwhittle/README @@ -0,0 +1 @@ +Solution by Francis Whittle diff --git a/challenge-108/frankivo/README b/challenge-108/frankivo/README new file mode 100644 index 0000000000..681b15b36c --- /dev/null +++ b/challenge-108/frankivo/README @@ -0,0 +1 @@ +Solution by Frank Oosterhuis. diff --git a/challenge-108/fred-zinn/README b/challenge-108/fred-zinn/README new file mode 100644 index 0000000000..17bac4f094 --- /dev/null +++ b/challenge-108/fred-zinn/README @@ -0,0 +1 @@ +Solution by Fred Zinn diff --git a/challenge-108/freddie-b/README b/challenge-108/freddie-b/README new file mode 100644 index 0000000000..823d7474b5 --- /dev/null +++ b/challenge-108/freddie-b/README @@ -0,0 +1 @@ +Solution by Freddie B diff --git a/challenge-108/garrett-goebel/README b/challenge-108/garrett-goebel/README new file mode 100644 index 0000000000..a8aa246dbb --- /dev/null +++ b/challenge-108/garrett-goebel/README @@ -0,0 +1 @@ +Solution by Garrett Goebel diff --git a/challenge-108/giuseppe-terlizzi/README b/challenge-108/giuseppe-terlizzi/README new file mode 100644 index 0000000000..0bff2a945c --- /dev/null +++ b/challenge-108/giuseppe-terlizzi/README @@ -0,0 +1 @@ +Solutions by Giuseppe Di Terlizzi. diff --git a/challenge-108/gugod/README b/challenge-108/gugod/README new file mode 100644 index 0000000000..509fd4c50c --- /dev/null +++ b/challenge-108/gugod/README @@ -0,0 +1 @@ +Solutions by Kang-min Liu. diff --git a/challenge-108/gugod/rust/.gitignore b/challenge-108/gugod/rust/.gitignore new file mode 100644 index 0000000000..ac77297bfe --- /dev/null +++ b/challenge-108/gugod/rust/.gitignore @@ -0,0 +1,2 @@ +ch-1 +ch-2 diff --git a/challenge-108/guillermo-ramos/README b/challenge-108/guillermo-ramos/README new file mode 100644 index 0000000000..a39eb01bff --- /dev/null +++ b/challenge-108/guillermo-ramos/README @@ -0,0 +1 @@ +Solution by Guillermo Ramos. diff --git a/challenge-108/gustavo-chaves/README b/challenge-108/gustavo-chaves/README new file mode 100644 index 0000000000..a66bbbf8a3 --- /dev/null +++ b/challenge-108/gustavo-chaves/README @@ -0,0 +1 @@ +Solution by Gustavo Chaves diff --git a/challenge-108/hatorikibble/README b/challenge-108/hatorikibble/README new file mode 100644 index 0000000000..51a9cd4411 --- /dev/null +++ b/challenge-108/hatorikibble/README @@ -0,0 +1 @@ +Solution by Peter Mayr diff --git a/challenge-108/hauke-d/README b/challenge-108/hauke-d/README new file mode 100644 index 0000000000..e201aa0abc --- /dev/null +++ b/challenge-108/hauke-d/README @@ -0,0 +1 @@ +Solutions by Hauke Dämpfling. diff --git a/challenge-108/henry-wong/README b/challenge-108/henry-wong/README new file mode 100644 index 0000000000..3d63a6f0be --- /dev/null +++ b/challenge-108/henry-wong/README @@ -0,0 +1 @@ +Solution by Henry Wong diff --git a/challenge-108/hstejas/README b/challenge-108/hstejas/README new file mode 100644 index 0000000000..969c5c0569 --- /dev/null +++ b/challenge-108/hstejas/README @@ -0,0 +1 @@ +Solution by Tejas diff --git a/challenge-108/ianrifkin/README b/challenge-108/ianrifkin/README new file mode 100644 index 0000000000..2d26297fb9 --- /dev/null +++ b/challenge-108/ianrifkin/README @@ -0,0 +1 @@ +Solution by Ian Rifkin. \ No newline at end of file diff --git a/challenge-108/izifresh/README b/challenge-108/izifresh/README new file mode 100644 index 0000000000..aedce7c408 --- /dev/null +++ b/challenge-108/izifresh/README @@ -0,0 +1 @@ +Solution by izifresh \ No newline at end of file diff --git a/challenge-108/jacques-guinnebault/README b/challenge-108/jacques-guinnebault/README new file mode 100644 index 0000000000..9d3e7c037f --- /dev/null +++ b/challenge-108/jacques-guinnebault/README @@ -0,0 +1 @@ +Solution by Jacques Guinnebault. diff --git a/challenge-108/jaime/README b/challenge-108/jaime/README new file mode 100644 index 0000000000..007cb58459 --- /dev/null +++ b/challenge-108/jaime/README @@ -0,0 +1,59 @@ +# Task #1 + +Write a script to display months from the year 1900 to 2019 where you +find 5 weekends i.e. 5 Friday, 5 Saturday and 5 Sunday. + +## Solution + +Months that contain five full weekends have 31 days and start on a Friday. Use `cal` to display March 2019 as an example. + +``` +#$ cal -h -m 3 2019 # cal is a UNIX utility + March 2019 +Su Mo Tu We Th Fr Sa + 1 2 + 3 4 5 6 7 8 9 +10 11 12 13 14 15 16 +17 18 19 20 21 22 23 +24 25 26 27 28 29 30 +31 +``` + +The solution runs `cal` and displays months that match this unique +layout. + +# Task #2 + +Write a script that can wrap the given paragraph at a specified column +using the greedy algorithm. + +A simple way to do word wrapping is to use a greedy algorithm that +puts as many words on a line as possible, then moving on to the next +line to do the same until there are no more words left to place. This +method is used by many modern word processors, such as OpenOffice.org +Writer and Microsoft Word[citation needed]. This algorithm always uses +the minimum possible number of lines but may lead to lines of widely +varying lengths. The following pseudocode implements this algorithm: + +``` +SpaceLeft := LineWidth +for each Word in Text + if (Width(Word) + SpaceWidth) > SpaceLeft + insert line break before Word in Text + SpaceLeft := LineWidth - Width(Word) + else + SpaceLeft := SpaceLeft - (Width(Word) + SpaceWidth) +``` + +Where LineWidth is the width of a line, SpaceLeft is the remaining +width of space on the line to fill, SpaceWidth is the width of a +single space character, Text is the input text to iterate over and +Word is a word in this text. + +## Solution + +The solution follows the recommended pseudocode. Minor improvements +avoid trailing whitespace. + +The script uses `Text::ParseWords::shellwords` from the standard +library to extract chunks of words from ``. diff --git a/challenge-108/jaldhar-h-vyas/README b/challenge-108/jaldhar-h-vyas/README new file mode 100644 index 0000000000..7dce927eca --- /dev/null +++ b/challenge-108/jaldhar-h-vyas/README @@ -0,0 +1 @@ +Solution by Jaldhar H. Vyas diff --git a/challenge-108/james-smith/README.md b/challenge-108/james-smith/README.md new file mode 100644 index 0000000000..ad96ffed8f --- /dev/null +++ b/challenge-108/james-smith/README.md @@ -0,0 +1,161 @@ +# Solution challenge 1 - Generate the first 3 self-descriptive numbers + +To describe a number we write down the number of 0s, 1s, 2s, 3s, etc + +A self-descriptive number is one of length `n` such that in base `n` the +description above is the number itself. + +Generating self descriptive numbers can be split between the case where n >= 7 and n < 7... +As we are asked for the first 3 these all exist in the case where n<7.... + +For n >= 7 the self-descriptive numbers are of the form + `n-4`, `21`, `0` {n-7 times}, `1000`; + +In our solution we loop through numbers starting 1 to see if they are self descriptive. + +To get the desciption of a number of length k, we loop from `0`..`(k-1)` counting the number of each digit in the string... +We can do this with a harcoded series of tr///s but if we want something dynamic we can write this as + +`@Q = m{($_)}g; $count = scalar @Q;` + +we can do this in one line by using @{[ ]} to convert to the list of matches to an array { subtle distinction here between +lists and arrays! } and counting it by getting the scalar of the array... + +The description is obtained by stitching those counts together... We can do this in the one-line join q(), map below.. +We just store it the list if the description and the number are the same.... + +``` +use strict; + +use warnings; +use feature qw(say); +use Test::More; +my ($c,@res) = 0; + +while( ++$c && @res<3 ) { + push @res, $c if $c == join q(), + map { scalar @{[ $c=~m{($_)}g ]} } 0 .. -1 + length $c; +} + +say "@res"; +``` + +We can reduce this further - by rewriting the inner if with using the `&&` trick. `&&` is evaluated lazily - so that if +the left hand side is false then the right hand side is not evaluated. + +So `if($x) { y() }` can be written as `$x && y()`; + +Similarly - `unless($x) { y() }` can be written as `$x || y()` and `if($x) { y() } else { z() }` can be written `$x ? y() : z()` + +This means we can make the statement inside the loop a single statement and postfix the while... + +``` +($c,@res) = 0; + +( $c == join q(), + map { scalar @{[ $c=~m{($_)}g ]} } + 0 .. -1 + length $c +) && push @res, $c while ++$c && @res<3; + +say "@res"; +``` + +Note we have to wrap the "condition" in brackets to force it to be evaluated before the && as o/w the line ends in +0 .. -1 + length( $x && push @res, $c); + +This is why we right the "yoda" looking -1 + length $c as if you write length $c - 1 this evaluates to length($c-1); + +I wouldn't do this in "normal" code as I think it can get confusing $x && f() is not obviously a piece of logic & +especially if f() has implicit side effects as here. + +If we don't want to capture the values - but just display the results - we can drop this into a perl 1-liner on the +command liner. + +``` +perl -E '($c-join"",map{0+@{[$c=~/($_)/g]}}0..-1+length$c)||++$n&&say$c while++$c&&$n<3' +``` + +or + +``` +perl -E '($c-join"",map{0+(@Q=$c=~/($_)/g)}0..-1+length$c)||++$n&&say$c while++$c&&$n<3' +``` + +You will notice we are using slightly different tricks here... (Mainly we can do these because we haven't enabled strict!! something +you rarely do in Perl 1-liners...) + + * We use -E (rather than -e) this enables more modern perl features - including usefully say! + + * We don't collect results - and we just keep a counter - this time we use `||` and `&&` in the "logic"... + + * We know ++$n is always going to be true (it starts of explicitly) and so we always run `say$c` if we get to the `++$n`.. + + * Note here - this is a place where it is important to choose `++$n` rather than the more common `$n++`, as the first evaluates to `0` the first time it is invoked - meaning we would skip the first answer... + + * We show a different trick to count the elements of the list. + + * We can use another trick other than the scalar `@{[ ]}` trick to convert the list into an array. we store it in an array variable which makes it we can then get the length of the array (we just ignore the array!) + + * As we are keeping the code short - we can replace the keyword scalar with a simple 0+ which forces the array to be converted into a scalar (and hence returns the length) + + * To gain another character as the equality is numeric we can rewrite if($a==$b) { f() } as ($a-$b)||f(). + + `$a-$b` is non-zero (true) if `$a!=$b` + + `$a-$b` is zero (false) if `$a==$b` + + So we rewrite + + `if( $a == $b ) { f() }` as `unless( $a - $b ) { f() }` + + which we know we mentioned we could rewrite as: + + `($a-$b) || f()` + + The brackets are important o/w this evaluates to: + + `$a-($b||f())` + + which isn't what we want... + +# Solution challenge 2 - Methods of a class + +When you import a class `