From 95cbdcd52fed245f8e25b333af8b33470d4d48c0 Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Mon, 29 Apr 2019 03:30:58 +0100 Subject: - Added template for Challenge 006. --- challenge-006/abigail/README | 1 + challenge-006/adam-russell/README | 1 + challenge-006/ailbhe-tweedie/README | 1 + challenge-006/alex-daniel/README | 1 + challenge-006/alexander-karelas/README | 1 + challenge-006/alexey-melezhik/README | 1 + challenge-006/alicia-bielsa/README | 1 + challenge-006/andrezgz/README | 1 + challenge-006/antonio-gamiz/README | 1 + challenge-006/arne-sommer/README | 1 + challenge-006/arpad-toth/README | 1 + challenge-006/athanasius/README | 1 + challenge-006/aubrey-quarcoo/README | 1 + challenge-006/bill-palmer/README | 1 + challenge-006/bob-kleemann/README | 1 + challenge-006/cliveholloway/README | 1 + challenge-006/daniel-mantovani/README | 1 + challenge-006/dave-cross/README | 1 + challenge-006/dave-jacoby/README | 1 + challenge-006/david-kayal/README | 1 + challenge-006/doug-schrag/README | 1 + challenge-006/duncan-c-white/README | 35 ++++++++++++++++++++++++++++++ challenge-006/e-choroba/README | 1 + challenge-006/eddy-hs/README | 1 + challenge-006/finley/README | 1 + challenge-006/fjwhittle/README | 1 + challenge-006/fred-zinn/README | 1 + challenge-006/freddie-b/README | 1 + challenge-006/guillermo-ramos/README | 1 + challenge-006/gustavo-chaves/README | 1 + challenge-006/jacques-guinnebault/README | 1 + challenge-006/jaime/README | 23 ++++++++++++++++++++ challenge-006/jaldhar-h-vyas/README | 1 + challenge-006/james-smith/README | 1 + challenge-006/jeff/README | 1 + challenge-006/jeremy-carman/README | 1 + challenge-006/jim-bacon/README | 1 + challenge-006/jj-merelo/README | 1 + challenge-006/jo-christian-oterhals/README | 1 + challenge-006/joelle-maslak/README | 1 + challenge-006/john-barrett/README | 1 + challenge-006/juan-caballero/README | 1 + challenge-006/khalid/README | 1 + challenge-006/kian-meng-ang/README | 1 + challenge-006/kivanc-yazan/README | 1 + challenge-006/lars-balker/README | 1 + challenge-006/laurent-rosenfeld/README | 1 + challenge-006/magnus-woldrich/README | 1 + challenge-006/mark-senn/README | 1 + challenge-006/martin-mugeni/README | 1 + challenge-006/matt-latusek/README | 1 + challenge-006/maxim-kolodyazhny/README | 1 + challenge-006/michael-schaap/README | 1 + challenge-006/neil-bowers/README | 1 + challenge-006/nick-logan/README | 1 + challenge-006/ohmycloud/README | 1 + challenge-006/oleksii-tsvietnov/README | 1 + challenge-006/ozzy/README | 1 + challenge-006/pavel-jurca/README | 1 + challenge-006/pete-houston/README | 1 + challenge-006/philippe-bruhat/README | 1 + challenge-006/prajith-p/README | 1 + challenge-006/rob4t/README | 1 + challenge-006/ruben-westerberg/README | 10 +++++++++ challenge-006/sean-meininger/README | 1 + challenge-006/sergiotarxz/README | 1 + challenge-006/simon-proctor/README | 1 + challenge-006/simon-reinhardt/README | 1 + challenge-006/steve-rogerson/README | 1 + challenge-006/steven-lembark/README | 1 + challenge-006/steven-wilson/README | 1 + challenge-006/tiago-stock/README | 1 + challenge-006/tim-smith/README | 1 + challenge-006/tore-andersson/README | 1 + challenge-006/veesh-goldman/README | 1 + challenge-006/william-gilmore/README | 1 + challenge-006/yary-h/README | 1 + 77 files changed, 142 insertions(+) create mode 100644 challenge-006/abigail/README create mode 100644 challenge-006/adam-russell/README create mode 100644 challenge-006/ailbhe-tweedie/README create mode 100644 challenge-006/alex-daniel/README create mode 100644 challenge-006/alexander-karelas/README create mode 100644 challenge-006/alexey-melezhik/README create mode 100644 challenge-006/alicia-bielsa/README create mode 100644 challenge-006/andrezgz/README create mode 100644 challenge-006/antonio-gamiz/README create mode 100644 challenge-006/arne-sommer/README create mode 100644 challenge-006/arpad-toth/README create mode 100644 challenge-006/athanasius/README create mode 100644 challenge-006/aubrey-quarcoo/README create mode 100644 challenge-006/bill-palmer/README create mode 100644 challenge-006/bob-kleemann/README create mode 100644 challenge-006/cliveholloway/README create mode 100644 challenge-006/daniel-mantovani/README create mode 100644 challenge-006/dave-cross/README create mode 100644 challenge-006/dave-jacoby/README create mode 100644 challenge-006/david-kayal/README create mode 100644 challenge-006/doug-schrag/README create mode 100644 challenge-006/duncan-c-white/README create mode 100644 challenge-006/e-choroba/README create mode 100644 challenge-006/eddy-hs/README create mode 100644 challenge-006/finley/README create mode 100644 challenge-006/fjwhittle/README create mode 100644 challenge-006/fred-zinn/README create mode 100644 challenge-006/freddie-b/README create mode 100644 challenge-006/guillermo-ramos/README create mode 100644 challenge-006/gustavo-chaves/README create mode 100644 challenge-006/jacques-guinnebault/README create mode 100644 challenge-006/jaime/README create mode 100644 challenge-006/jaldhar-h-vyas/README create mode 100644 challenge-006/james-smith/README create mode 100644 challenge-006/jeff/README create mode 100644 challenge-006/jeremy-carman/README create mode 100644 challenge-006/jim-bacon/README create mode 100644 challenge-006/jj-merelo/README create mode 100644 challenge-006/jo-christian-oterhals/README create mode 100644 challenge-006/joelle-maslak/README create mode 100644 challenge-006/john-barrett/README create mode 100644 challenge-006/juan-caballero/README create mode 100644 challenge-006/khalid/README create mode 100644 challenge-006/kian-meng-ang/README create mode 100644 challenge-006/kivanc-yazan/README create mode 100644 challenge-006/lars-balker/README create mode 100644 challenge-006/laurent-rosenfeld/README create mode 100644 challenge-006/magnus-woldrich/README create mode 100644 challenge-006/mark-senn/README create mode 100644 challenge-006/martin-mugeni/README create mode 100644 challenge-006/matt-latusek/README create mode 100644 challenge-006/maxim-kolodyazhny/README create mode 100644 challenge-006/michael-schaap/README create mode 100644 challenge-006/neil-bowers/README create mode 100644 challenge-006/nick-logan/README create mode 100644 challenge-006/ohmycloud/README create mode 100644 challenge-006/oleksii-tsvietnov/README create mode 100644 challenge-006/ozzy/README create mode 100644 challenge-006/pavel-jurca/README create mode 100644 challenge-006/pete-houston/README create mode 100644 challenge-006/philippe-bruhat/README create mode 100644 challenge-006/prajith-p/README create mode 100644 challenge-006/rob4t/README create mode 100644 challenge-006/ruben-westerberg/README create mode 100644 challenge-006/sean-meininger/README create mode 100644 challenge-006/sergiotarxz/README create mode 100644 challenge-006/simon-proctor/README create mode 100644 challenge-006/simon-reinhardt/README create mode 100644 challenge-006/steve-rogerson/README create mode 100644 challenge-006/steven-lembark/README create mode 100644 challenge-006/steven-wilson/README create mode 100644 challenge-006/tiago-stock/README create mode 100644 challenge-006/tim-smith/README create mode 100644 challenge-006/tore-andersson/README create mode 100644 challenge-006/veesh-goldman/README create mode 100644 challenge-006/william-gilmore/README create mode 100644 challenge-006/yary-h/README (limited to 'challenge-006') diff --git a/challenge-006/abigail/README b/challenge-006/abigail/README new file mode 100644 index 0000000000..5f0d73ae16 --- /dev/null +++ b/challenge-006/abigail/README @@ -0,0 +1 @@ +Solution by Abigail diff --git a/challenge-006/adam-russell/README b/challenge-006/adam-russell/README new file mode 100644 index 0000000000..9420c9a781 --- /dev/null +++ b/challenge-006/adam-russell/README @@ -0,0 +1 @@ +Solution by Adam Russell diff --git a/challenge-006/ailbhe-tweedie/README b/challenge-006/ailbhe-tweedie/README new file mode 100644 index 0000000000..36d4034b70 --- /dev/null +++ b/challenge-006/ailbhe-tweedie/README @@ -0,0 +1 @@ +Solution by Ailbhe Tweedie diff --git a/challenge-006/alex-daniel/README b/challenge-006/alex-daniel/README new file mode 100644 index 0000000000..65550789bd --- /dev/null +++ b/challenge-006/alex-daniel/README @@ -0,0 +1 @@ +Solution by Alex Daniel. diff --git a/challenge-006/alexander-karelas/README b/challenge-006/alexander-karelas/README new file mode 100644 index 0000000000..3de9fce8d9 --- /dev/null +++ b/challenge-006/alexander-karelas/README @@ -0,0 +1 @@ +Solution by Alexander Karelas diff --git a/challenge-006/alexey-melezhik/README b/challenge-006/alexey-melezhik/README new file mode 100644 index 0000000000..ca7008f224 --- /dev/null +++ b/challenge-006/alexey-melezhik/README @@ -0,0 +1 @@ +Solution by Alexey Melezhik diff --git a/challenge-006/alicia-bielsa/README b/challenge-006/alicia-bielsa/README new file mode 100644 index 0000000000..c5187874c3 --- /dev/null +++ b/challenge-006/alicia-bielsa/README @@ -0,0 +1 @@ +Solution by Alicia Beilsa. diff --git a/challenge-006/andrezgz/README b/challenge-006/andrezgz/README new file mode 100644 index 0000000000..f4fd0da88e --- /dev/null +++ b/challenge-006/andrezgz/README @@ -0,0 +1 @@ +Solution by Andrezgz diff --git a/challenge-006/antonio-gamiz/README b/challenge-006/antonio-gamiz/README new file mode 100644 index 0000000000..1f5ed5871a --- /dev/null +++ b/challenge-006/antonio-gamiz/README @@ -0,0 +1 @@ +Solution by Antonio Gamiz diff --git a/challenge-006/arne-sommer/README b/challenge-006/arne-sommer/README new file mode 100644 index 0000000000..b5d88e4df4 --- /dev/null +++ b/challenge-006/arne-sommer/README @@ -0,0 +1 @@ +Solution by Arne Sommer. diff --git a/challenge-006/arpad-toth/README b/challenge-006/arpad-toth/README new file mode 100644 index 0000000000..6661dd82c1 --- /dev/null +++ b/challenge-006/arpad-toth/README @@ -0,0 +1 @@ +Solution by Arpad Toth diff --git a/challenge-006/athanasius/README b/challenge-006/athanasius/README new file mode 100644 index 0000000000..cc357fda4a --- /dev/null +++ b/challenge-006/athanasius/README @@ -0,0 +1 @@ +Solution by Athanasius diff --git a/challenge-006/aubrey-quarcoo/README b/challenge-006/aubrey-quarcoo/README new file mode 100644 index 0000000000..8e63a2c1f5 --- /dev/null +++ b/challenge-006/aubrey-quarcoo/README @@ -0,0 +1 @@ +Solution by Aubrey Quarcoo diff --git a/challenge-006/bill-palmer/README b/challenge-006/bill-palmer/README new file mode 100644 index 0000000000..08ec849a41 --- /dev/null +++ b/challenge-006/bill-palmer/README @@ -0,0 +1 @@ +Solution by Bill Palmer. diff --git a/challenge-006/bob-kleemann/README b/challenge-006/bob-kleemann/README new file mode 100644 index 0000000000..78680e4035 --- /dev/null +++ b/challenge-006/bob-kleemann/README @@ -0,0 +1 @@ +Solution by Bob Kleemann diff --git a/challenge-006/cliveholloway/README b/challenge-006/cliveholloway/README new file mode 100644 index 0000000000..b69201296e --- /dev/null +++ b/challenge-006/cliveholloway/README @@ -0,0 +1 @@ +Solution by Clive Holloway diff --git a/challenge-006/daniel-mantovani/README b/challenge-006/daniel-mantovani/README new file mode 100644 index 0000000000..ed538216f2 --- /dev/null +++ b/challenge-006/daniel-mantovani/README @@ -0,0 +1 @@ +Solution by Daniel Mantovani diff --git a/challenge-006/dave-cross/README b/challenge-006/dave-cross/README new file mode 100644 index 0000000000..04b1b0623b --- /dev/null +++ b/challenge-006/dave-cross/README @@ -0,0 +1 @@ +Solution by Dave Cross diff --git a/challenge-006/dave-jacoby/README b/challenge-006/dave-jacoby/README new file mode 100644 index 0000000000..7c06689f16 --- /dev/null +++ b/challenge-006/dave-jacoby/README @@ -0,0 +1 @@ +Solution by Dave Jacoby diff --git a/challenge-006/david-kayal/README b/challenge-006/david-kayal/README new file mode 100644 index 0000000000..66f8615260 --- /dev/null +++ b/challenge-006/david-kayal/README @@ -0,0 +1 @@ +Solution by David Kayal diff --git a/challenge-006/doug-schrag/README b/challenge-006/doug-schrag/README new file mode 100644 index 0000000000..bf8a10ffb4 --- /dev/null +++ b/challenge-006/doug-schrag/README @@ -0,0 +1 @@ +Solution by Doug Schrag diff --git a/challenge-006/duncan-c-white/README b/challenge-006/duncan-c-white/README new file mode 100644 index 0000000000..b785f171b8 --- /dev/null +++ b/challenge-006/duncan-c-white/README @@ -0,0 +1,35 @@ +Challenge 1: "Write a program which prints out all anagrams for a given word." + +Note: I assume that we'll need a wordlist to judge whether a rearrangement +of letters is actually a word, /usr/share/dict/words is the obvious one +to use. The simplest way of solving this problem is to use alphabetically +sorted SIGNATURES of words - simply the bag of letters in the word sorted. + +So "hello"'s signature is "ehllo". The important thing for anagram purposes +is that "ehllo" is the signature not only of "hello", but of any other anagram +of hello too. + +So: calculate the signature of the given word, then for every word in the +dictionary (of the right length if we want to save time), calculate that +dictionary word's signature - then print out the dictionary word if it's +signature is the sameas the given word's signature. + +Note that ch-1.pl takes two command line arguments: the first is the +word, the second is the optional filename of the wordlist to use, +if it's not given then /usr/share/dict/words is used by default. + + +Challenge 2: "Write a program to find the sequence of characters that has +the most anagrams." + +That's rather badly worded, but I choose to interprete it as "find which +word in a wordlist has most anagrams also in that wordlist". + +Note that ch-2.pl takes a single optional command line argument: +the filename of the wordlist to use, if it's not given then +/usr/share/dict/words is used by default. + +So: Calculate the signature of every word in the dictionary, building %anag: +a mapping from signature -> list of words with that signature, and keep track +of the longest word list of any signature (i.e. the biggest anagram set so far) +as we go. Print out the signature with the longest word list at the end. diff --git a/challenge-006/e-choroba/README b/challenge-006/e-choroba/README new file mode 100644 index 0000000000..efff637bcb --- /dev/null +++ b/challenge-006/e-choroba/README @@ -0,0 +1 @@ +Solutions by E. Choroba. diff --git a/challenge-006/eddy-hs/README b/challenge-006/eddy-hs/README new file mode 100644 index 0000000000..0ed51d222d --- /dev/null +++ b/challenge-006/eddy-hs/README @@ -0,0 +1 @@ +Solution by Eddy HS diff --git a/challenge-006/finley/README b/challenge-006/finley/README new file mode 100644 index 0000000000..f08a121076 --- /dev/null +++ b/challenge-006/finley/README @@ -0,0 +1 @@ +Solution by Finley diff --git a/challenge-006/fjwhittle/README b/challenge-006/fjwhittle/README new file mode 100644 index 0000000000..7dcc95e189 --- /dev/null +++ b/challenge-006/fjwhittle/README @@ -0,0 +1 @@ +Solution by Francis Whittle diff --git a/challenge-006/fred-zinn/README b/challenge-006/fred-zinn/README new file mode 100644 index 0000000000..17bac4f094 --- /dev/null +++ b/challenge-006/fred-zinn/README @@ -0,0 +1 @@ +Solution by Fred Zinn diff --git a/challenge-006/freddie-b/README b/challenge-006/freddie-b/README new file mode 100644 index 0000000000..823d7474b5 --- /dev/null +++ b/challenge-006/freddie-b/README @@ -0,0 +1 @@ +Solution by Freddie B diff --git a/challenge-006/guillermo-ramos/README b/challenge-006/guillermo-ramos/README new file mode 100644 index 0000000000..a39eb01bff --- /dev/null +++ b/challenge-006/guillermo-ramos/README @@ -0,0 +1 @@ +Solution by Guillermo Ramos. diff --git a/challenge-006/gustavo-chaves/README b/challenge-006/gustavo-chaves/README new file mode 100644 index 0000000000..a66bbbf8a3 --- /dev/null +++ b/challenge-006/gustavo-chaves/README @@ -0,0 +1 @@ +Solution by Gustavo Chaves diff --git a/challenge-006/jacques-guinnebault/README b/challenge-006/jacques-guinnebault/README new file mode 100644 index 0000000000..9d3e7c037f --- /dev/null +++ b/challenge-006/jacques-guinnebault/README @@ -0,0 +1 @@ +Solution by Jacques Guinnebault. diff --git a/challenge-006/jaime/README b/challenge-006/jaime/README new file mode 100644 index 0000000000..46e62dafa4 --- /dev/null +++ b/challenge-006/jaime/README @@ -0,0 +1,23 @@ +Solution by Jaime Corchado, (@tortsnare)[https://twitter.com/tortsnare]. + +#Challenge #1 +Write a program which prints out all anagrams for a given word. + +## Solution +Lookup anagrams in a hash of Engligh words. + +The script does initialize a list of words from Webster's Second International dictionary, + but I removed any hyphenated or capitalized words. + +All words are keyed by alphabetical order. `join "", sort split //` +Words that are anagrams of one another share the same key. +Words that are not anagrams, do not share a key. + +The script reports the anagrams of its arguments by looking up all words that share the key. + +#Challenge #2 +Write a program to find the sequence of characters that has the most. + +## Solution +The English words are hashed as before. +The script tracks the key with the most additions. diff --git a/challenge-006/jaldhar-h-vyas/README b/challenge-006/jaldhar-h-vyas/README new file mode 100644 index 0000000000..7dce927eca --- /dev/null +++ b/challenge-006/jaldhar-h-vyas/README @@ -0,0 +1 @@ +Solution by Jaldhar H. Vyas diff --git a/challenge-006/james-smith/README b/challenge-006/james-smith/README new file mode 100644 index 0000000000..573d9eb02a --- /dev/null +++ b/challenge-006/james-smith/README @@ -0,0 +1 @@ +Solution by James Smith diff --git a/challenge-006/jeff/README b/challenge-006/jeff/README new file mode 100644 index 0000000000..d5f15f4a8e --- /dev/null +++ b/challenge-006/jeff/README @@ -0,0 +1 @@ +Solution by Jeff diff --git a/challenge-006/jeremy-carman/README b/challenge-006/jeremy-carman/README new file mode 100644 index 0000000000..3d08510e49 --- /dev/null +++ b/challenge-006/jeremy-carman/README @@ -0,0 +1 @@ +Solution by Jeremy Carman diff --git a/challenge-006/jim-bacon/README b/challenge-006/jim-bacon/README new file mode 100644 index 0000000000..8dcfd637a3 --- /dev/null +++ b/challenge-006/jim-bacon/README @@ -0,0 +1 @@ +Solution by Jim Bacon diff --git a/challenge-006/jj-merelo/README b/challenge-006/jj-merelo/README new file mode 100644 index 0000000000..d09838676b --- /dev/null +++ b/challenge-006/jj-merelo/README @@ -0,0 +1 @@ +Solution by JJ Merelo diff --git a/challenge-006/jo-christian-oterhals/README b/challenge-006/jo-christian-oterhals/README new file mode 100644 index 0000000000..eafff999fb --- /dev/null +++ b/challenge-006/jo-christian-oterhals/README @@ -0,0 +1 @@ +Solution by Jo Christian Oterhals diff --git a/challenge-006/joelle-maslak/README b/challenge-006/joelle-maslak/README new file mode 100644 index 0000000000..d12c7940c3 --- /dev/null +++ b/challenge-006/joelle-maslak/README @@ -0,0 +1 @@ +Solution by Joelle Maslak diff --git a/challenge-006/john-barrett/README b/challenge-006/john-barrett/README new file mode 100644 index 0000000000..a7ff0af641 --- /dev/null +++ b/challenge-006/john-barrett/README @@ -0,0 +1 @@ +Solution by John Barrett diff --git a/challenge-006/juan-caballero/README b/challenge-006/juan-caballero/README new file mode 100644 index 0000000000..bffe4b05c2 --- /dev/null +++ b/challenge-006/juan-caballero/README @@ -0,0 +1 @@ +Solution by Juan Caballero diff --git a/challenge-006/khalid/README b/challenge-006/khalid/README new file mode 100644 index 0000000000..1ca4211368 --- /dev/null +++ b/challenge-006/khalid/README @@ -0,0 +1 @@ +Solution by Khalid diff --git a/challenge-006/kian-meng-ang/README b/challenge-006/kian-meng-ang/README new file mode 100644 index 0000000000..a5f0359813 --- /dev/null +++ b/challenge-006/kian-meng-ang/README @@ -0,0 +1 @@ +Solution by Kian-Meng Ang diff --git a/challenge-006/kivanc-yazan/README b/challenge-006/kivanc-yazan/README new file mode 100644 index 0000000000..bc7f8ca509 --- /dev/null +++ b/challenge-006/kivanc-yazan/README @@ -0,0 +1 @@ +Solution by Kivanc Yazan diff --git a/challenge-006/lars-balker/README b/challenge-006/lars-balker/README new file mode 100644 index 0000000000..054649c9eb --- /dev/null +++ b/challenge-006/lars-balker/README @@ -0,0 +1 @@ +Solution by Lars Balker diff --git a/challenge-006/laurent-rosenfeld/README b/challenge-006/laurent-rosenfeld/README new file mode 100644 index 0000000000..f9c6e1437e --- /dev/null +++ b/challenge-006/laurent-rosenfeld/README @@ -0,0 +1 @@ +Solution by Laurent Rosenfeld diff --git a/challenge-006/magnus-woldrich/README b/challenge-006/magnus-woldrich/README new file mode 100644 index 0000000000..79cde2997c --- /dev/null +++ b/challenge-006/magnus-woldrich/README @@ -0,0 +1 @@ +Solution by Magnus Woldrich diff --git a/challenge-006/mark-senn/README b/challenge-006/mark-senn/README new file mode 100644 index 0000000000..f37c93431c --- /dev/null +++ b/challenge-006/mark-senn/README @@ -0,0 +1 @@ +Solution by Mark Senn diff --git a/challenge-006/martin-mugeni/README b/challenge-006/martin-mugeni/README new file mode 100644 index 0000000000..416ca98166 --- /dev/null +++ b/challenge-006/martin-mugeni/README @@ -0,0 +1 @@ +Solution by Martin Mugeni diff --git a/challenge-006/matt-latusek/README b/challenge-006/matt-latusek/README new file mode 100644 index 0000000000..e1dc8b6e16 --- /dev/null +++ b/challenge-006/matt-latusek/README @@ -0,0 +1 @@ +Solution by Matt Latusek. diff --git a/challenge-006/maxim-kolodyazhny/README b/challenge-006/maxim-kolodyazhny/README new file mode 100644 index 0000000000..e5b4df7154 --- /dev/null +++ b/challenge-006/maxim-kolodyazhny/README @@ -0,0 +1 @@ +Solution by Maxim Kolodyazhny diff --git a/challenge-006/michael-schaap/README b/challenge-006/michael-schaap/README new file mode 100644 index 0000000000..db803c5d87 --- /dev/null +++ b/challenge-006/michael-schaap/README @@ -0,0 +1 @@ +Solution by Michael Schaap diff --git a/challenge-006/neil-bowers/README b/challenge-006/neil-bowers/README new file mode 100644 index 0000000000..9d446303df --- /dev/null +++ b/challenge-006/neil-bowers/README @@ -0,0 +1 @@ +Solution by Neil Bowers diff --git a/challenge-006/nick-logan/README b/challenge-006/nick-logan/README new file mode 100644 index 0000000000..86919ac8b8 --- /dev/null +++ b/challenge-006/nick-logan/README @@ -0,0 +1 @@ +Solution by Nick Logan diff --git a/challenge-006/ohmycloud/README b/challenge-006/ohmycloud/README new file mode 100644 index 0000000000..e993fafea7 --- /dev/null +++ b/challenge-006/ohmycloud/README @@ -0,0 +1 @@ +Solution by Ohmycloud diff --git a/challenge-006/oleksii-tsvietnov/README b/challenge-006/oleksii-tsvietnov/README new file mode 100644 index 0000000000..113183cc6d --- /dev/null +++ b/challenge-006/oleksii-tsvietnov/README @@ -0,0 +1 @@ +Solution by Oleksii Tsvietnov diff --git a/challenge-006/ozzy/README b/challenge-006/ozzy/README new file mode 100644 index 0000000000..44e39371ef --- /dev/null +++ b/challenge-006/ozzy/README @@ -0,0 +1 @@ +Solution by Ozzy diff --git a/challenge-006/pavel-jurca/README b/challenge-006/pavel-jurca/README new file mode 100644 index 0000000000..78d131bd34 --- /dev/null +++ b/challenge-006/pavel-jurca/README @@ -0,0 +1 @@ +Solution by Pavel Jurca diff --git a/challenge-006/pete-houston/README b/challenge-006/pete-houston/README new file mode 100644 index 0000000000..15d44fe3a4 --- /dev/null +++ b/challenge-006/pete-houston/README @@ -0,0 +1 @@ +Solution by Pete Houston diff --git a/challenge-006/philippe-bruhat/README b/challenge-006/philippe-bruhat/README new file mode 100644 index 0000000000..0bf3aeed05 --- /dev/null +++ b/challenge-006/philippe-bruhat/README @@ -0,0 +1 @@ +Solution by Philippe Bruhat diff --git a/challenge-006/prajith-p/README b/challenge-006/prajith-p/README new file mode 100644 index 0000000000..20517308f8 --- /dev/null +++ b/challenge-006/prajith-p/README @@ -0,0 +1 @@ +Solution by Prajith P diff --git a/challenge-006/rob4t/README b/challenge-006/rob4t/README new file mode 100644 index 0000000000..787d89fa0a --- /dev/null +++ b/challenge-006/rob4t/README @@ -0,0 +1 @@ +Solution by Robert Gratza diff --git a/challenge-006/ruben-westerberg/README b/challenge-006/ruben-westerberg/README new file mode 100644 index 0000000000..52df0a72a3 --- /dev/null +++ b/challenge-006/ruben-westerberg/README @@ -0,0 +1,10 @@ +Solution by Ruben Westerberg + +These solutions use the words list/dictionary sourced from https://github.com/dwyl/english-words. +End of line was changed from dos to unix for the purpose of these programs + +#Challenge 1: Write a program which prints out all anagrams for a given word. +Usage: give a single command line argument which is the word/sequence to find anagrams for + +#Challenge 2: Write a program to find the sequence of characters that has the most anagrams +Run without commandline arguments. diff --git a/challenge-006/sean-meininger/README b/challenge-006/sean-meininger/README new file mode 100644 index 0000000000..8ca81e00a0 --- /dev/null +++ b/challenge-006/sean-meininger/README @@ -0,0 +1 @@ +Solution by Sean Meininger diff --git a/challenge-006/sergiotarxz/README b/challenge-006/sergiotarxz/README new file mode 100644 index 0000000000..6aac3baa4f --- /dev/null +++ b/challenge-006/sergiotarxz/README @@ -0,0 +1 @@ +Solution by Sergio Iglesias. diff --git a/challenge-006/simon-proctor/README b/challenge-006/simon-proctor/README new file mode 100644 index 0000000000..f674742166 --- /dev/null +++ b/challenge-006/simon-proctor/README @@ -0,0 +1 @@ +Solution by Simon Proctor diff --git a/challenge-006/simon-reinhardt/README b/challenge-006/simon-reinhardt/README new file mode 100644 index 0000000000..422afa13b4 --- /dev/null +++ b/challenge-006/simon-reinhardt/README @@ -0,0 +1 @@ +Solution by Simon Reinhardt diff --git a/challenge-006/steve-rogerson/README b/challenge-006/steve-rogerson/README new file mode 100644 index 0000000000..bd91edaf63 --- /dev/null +++ b/challenge-006/steve-rogerson/README @@ -0,0 +1 @@ +Solution by Steve Rogerson diff --git a/challenge-006/steven-lembark/README b/challenge-006/steven-lembark/README new file mode 100644 index 0000000000..74894afa94 --- /dev/null +++ b/challenge-006/steven-lembark/README @@ -0,0 +1 @@ +Solution by Steven Lembark diff --git a/challenge-006/steven-wilson/README b/challenge-006/steven-wilson/README new file mode 100644 index 0000000000..6911e56168 --- /dev/null +++ b/challenge-006/steven-wilson/README @@ -0,0 +1 @@ +Solution by Steven Wilson diff --git a/challenge-006/tiago-stock/README b/challenge-006/tiago-stock/README new file mode 100644 index 0000000000..096a081b30 --- /dev/null +++ b/challenge-006/tiago-stock/README @@ -0,0 +1 @@ +Solution by Tiago Stock diff --git a/challenge-006/tim-smith/README b/challenge-006/tim-smith/README new file mode 100644 index 0000000000..83596de4fd --- /dev/null +++ b/challenge-006/tim-smith/README @@ -0,0 +1 @@ +Solution by Tim Smith diff --git a/challenge-006/tore-andersson/README b/challenge-006/tore-andersson/README new file mode 100644 index 0000000000..6b1b021ce0 --- /dev/null +++ b/challenge-006/tore-andersson/README @@ -0,0 +1 @@ +Solution by Tore Andersson diff --git a/challenge-006/veesh-goldman/README b/challenge-006/veesh-goldman/README new file mode 100644 index 0000000000..28a85f6e5c --- /dev/null +++ b/challenge-006/veesh-goldman/README @@ -0,0 +1 @@ +Solution by Veesh Goldman diff --git a/challenge-006/william-gilmore/README b/challenge-006/william-gilmore/README new file mode 100644 index 0000000000..e3df40ca2a --- /dev/null +++ b/challenge-006/william-gilmore/README @@ -0,0 +1 @@ +Solution by William Gilmore diff --git a/challenge-006/yary-h/README b/challenge-006/yary-h/README new file mode 100644 index 0000000000..200fbce413 --- /dev/null +++ b/challenge-006/yary-h/README @@ -0,0 +1 @@ +Solution by Yary H -- cgit From afb9cb7a63ec18805ffeeb3c713277456ca63f0b Mon Sep 17 00:00:00 2001 From: Joelle Maslak Date: Mon, 29 Apr 2019 02:32:28 +0000 Subject: Add Perl6 for Week 6 Problem 1 --- challenge-006/joelle-maslak/perl6/ch-1.p6 | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 challenge-006/joelle-maslak/perl6/ch-1.p6 (limited to 'challenge-006') diff --git a/challenge-006/joelle-maslak/perl6/ch-1.p6 b/challenge-006/joelle-maslak/perl6/ch-1.p6 new file mode 100755 index 0000000000..0e8a3f9a23 --- /dev/null +++ b/challenge-006/joelle-maslak/perl6/ch-1.p6 @@ -0,0 +1,29 @@ +#!/usr/bin/env perl6 +use v6; + +# To call this application: +# +# perl6 ch-1.p6 +# +# Numbers should be space seperated. +# + +my Pair $run; +my @runs; + +for @*ARGS.sort( { $^a <=> $^b } ) -> Int() $num { + if ! defined $run { + $run = Pair.new($num, $num); + } else { + if $run.value == $num - 1 { + $run = Pair.new($run.key, $num); + } else { + @runs.append($run); + $run = Pair.new($num, $num); + } + } + $run.freeze; +} +@runs.append($run) if defined $run; + +say join(",", @runs.map( { (.key ≠ .value) ?? "{.key}-{.values}" !! .key } ) ); -- cgit From 00131a6afd8cc12e82f58cd49aa705a0b3d1a440 Mon Sep 17 00:00:00 2001 From: Joelle Maslak Date: Mon, 29 Apr 2019 02:39:49 +0000 Subject: Add Perl 5 week 6 problem 1 --- challenge-006/joelle-maslak/perl5/ch-1.pl | 37 +++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 challenge-006/joelle-maslak/perl5/ch-1.pl (limited to 'challenge-006') diff --git a/challenge-006/joelle-maslak/perl5/ch-1.pl b/challenge-006/joelle-maslak/perl5/ch-1.pl new file mode 100755 index 0000000000..f01b07d0ce --- /dev/null +++ b/challenge-006/joelle-maslak/perl5/ch-1.pl @@ -0,0 +1,37 @@ +#!/usr/bin/env perl +use v5.26; +use strict; +use warnings; + +# Turn on method signatures +use feature 'signatures'; +no warnings 'experimental::signatures'; + +use autodie; + +# To call this application: +# +# perl ch-1.pl +# +# Numbers should be space seperated. +# + +my $run; +my @runs; + +for my $num ( sort( { $a <=> $b } @ARGV ) ) { + if ( !defined $run ) { + $run = [ $num, $num ]; + } else { + if ( $run->[1] == $num - 1 ) { + $run->[1] = $num; + } else { + push @runs, $run; + $run = [ $num, $num ]; + } + } +} +push @runs, $run if defined $run; + +say join( ",", map( { ( $_->[0] != $_->[1] ) ? join( '-', @$_ ) : $_->[0] } @runs ) ); + -- cgit From d3f8dcef51c45538e3be8255bd7064fc782cb48c Mon Sep 17 00:00:00 2001 From: Joelle Maslak Date: Mon, 29 Apr 2019 00:06:42 -0600 Subject: Add Perl6 solution to Week 6, Problem 2 --- challenge-006/joelle-maslak/perl6/ch-2.p6 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 challenge-006/joelle-maslak/perl6/ch-2.p6 (limited to 'challenge-006') diff --git a/challenge-006/joelle-maslak/perl6/ch-2.p6 b/challenge-006/joelle-maslak/perl6/ch-2.p6 new file mode 100755 index 0000000000..01632f9cc7 --- /dev/null +++ b/challenge-006/joelle-maslak/perl6/ch-2.p6 @@ -0,0 +1,16 @@ +#!/usr/bin/env perl6 +use v6; + +# +# Copyright © 2019 Joelle Maslak +# All Rights Reserved - See License +# +# I am assuming that we really wanted Ramanujan's Constant, and not the +# linked to Wiki page on the Landau-Ramanujan Constant which is +# something else entirely! +# +# Checked against http://oeis.org/A060295 + +# We'll give *33* digits of precison, not 32. ;) +say (640320³ + 744 - 196844.FatRat/(640320³ + 744)).Str.substr(0,34); + -- cgit From f5603bb8366797ae519bb8f1e7a3a4bbb257c15a Mon Sep 17 00:00:00 2001 From: Joelle Maslak Date: Mon, 29 Apr 2019 00:09:57 -0600 Subject: Perl 5 solution to Week 6, Problem 2 --- challenge-006/joelle-maslak/perl5/ch-2.pl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 challenge-006/joelle-maslak/perl5/ch-2.pl (limited to 'challenge-006') diff --git a/challenge-006/joelle-maslak/perl5/ch-2.pl b/challenge-006/joelle-maslak/perl5/ch-2.pl new file mode 100755 index 0000000000..7ae8f0c9bc --- /dev/null +++ b/challenge-006/joelle-maslak/perl5/ch-2.pl @@ -0,0 +1,20 @@ +#!/usr/bin/env perl +use v5.26; +use strict; +use warnings; + +use bignum; + +# +# Copyright © 2019 Joelle Maslak +# All Rights Reserved - See License +# +# I am assuming that we really wanted Ramanujan's Constant, and not the +# linked to Wiki page on the Landau-Ramanujan Constant which is +# something else entirely! +# +# Checked against http://oeis.org/A060295 + +# We'll give *33* digits of precison, not 32. ;) +say substr(640320**3 + 744 - 196844/(640320**3 + 744), 0, 34); + -- cgit From cafb5ec400a92beb13c03ceb88e071b4d1bffdc2 Mon Sep 17 00:00:00 2001 From: Joelle Maslak Date: Mon, 29 Apr 2019 00:11:16 -0600 Subject: Add a bit of comment --- challenge-006/joelle-maslak/perl5/ch-2.pl | 3 ++- challenge-006/joelle-maslak/perl6/ch-2.p6 | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'challenge-006') diff --git a/challenge-006/joelle-maslak/perl5/ch-2.pl b/challenge-006/joelle-maslak/perl5/ch-2.pl index 7ae8f0c9bc..b11ad31428 100755 --- a/challenge-006/joelle-maslak/perl5/ch-2.pl +++ b/challenge-006/joelle-maslak/perl5/ch-2.pl @@ -6,7 +6,7 @@ use warnings; use bignum; # -# Copyright © 2019 Joelle Maslak +# Copyright (C) 2019 Joelle Maslak # All Rights Reserved - See License # # I am assuming that we really wanted Ramanujan's Constant, and not the @@ -16,5 +16,6 @@ use bignum; # Checked against http://oeis.org/A060295 # We'll give *33* digits of precison, not 32. ;) +# Formula is from the Wiki page. :) It's accurate to 33 digits. say substr(640320**3 + 744 - 196844/(640320**3 + 744), 0, 34); diff --git a/challenge-006/joelle-maslak/perl6/ch-2.p6 b/challenge-006/joelle-maslak/perl6/ch-2.p6 index 01632f9cc7..da44856b14 100755 --- a/challenge-006/joelle-maslak/perl6/ch-2.p6 +++ b/challenge-006/joelle-maslak/perl6/ch-2.p6 @@ -12,5 +12,6 @@ use v6; # Checked against http://oeis.org/A060295 # We'll give *33* digits of precison, not 32. ;) +# Formula is from the Wiki page. :) It's accurate to 33 digits. say (640320³ + 744 - 196844.FatRat/(640320³ + 744)).Str.substr(0,34); -- cgit