The Weekly Challenge - 082

Monday, Oct 12, 2020| Tags: Perl, Raku

TABLE OF CONTENTS


1. HEADLINES

2. RECAP

3. PERL REVIEW

4. RAKU REVIEW

5. CHART

6. NEW MEMBERS

7. GUESTS

8. TASK #1: Common Factors

9. TASK #2: Interleave String


HEADLINES


Congratulations Team PWC for crossing the magic number 4th times in a row.

Contributions Summary


Welcome Jose Luis and Frank Oosterhuis to the Team PWC.

This week, we had 26 contributions by guests in 11 different languages. I would like to THANK each and every guest contributors.

Scala is the new language introduced this week by Frank Oosterhuis.

Languages Summary


While we are talking about contributions, lets share some interesting stats from the GitHub repository.

1) Commits: 10,183 (+185)

2) Pull Requests: 2,494 (+46)

3) Contributors: 137 (+1)

4) Fork: 170 (+2)

5) Stars: 79


Last but not the least, I would like to thank each and every member for their support and encouragement.

RECAP


Quick recap of the “The Weekly Challenge - 081” by Mohammad S Anwar.


PERL REVIEW


Please checkout Perl solutions review of the “The Weekly Challenge - 080” by Colin Crain.

If you missed any past reviews then please checkout the collection.


RAKU REVIEW


Please checkout Raku solutions review of the “The Weekly Challenge - 080” by Andrew Shitov.

If you missed any past reviews then please checkout the collection.


CHART


Please take a look at the charts showing interesting data.

I would like to THANK every member of the team for their valuable suggestions. Please do share your experience with us.


NEW MEMBERS


1) Jose Luis, an experienced Perl hacker from Barcelona, Spain.

2) Frank Oosterhuis, guest from Groningen, Netherlands.


Please find out How to contribute?, if you have any doubts.

Please give it a try to an excellent tool EZPWC created by respected member Saif Ahmed of Team PWC.


GUESTS


1) Frank Oosterhuis shared solution to Task #2 in Scala.

2) Lubos Kolouch shared solutions to Task #1 and Task #2 in Python.

3) Myoungjin Jeon shared solutions to Task #1 and Task #2 in Go.

4) Myoungjin Jeon shared solutions to Task #1 and Task #2 in Haskell.

5) Nuno Vieira shared solutions to Task #1 and Task #2 in JavaScript.

6) Richard Park shared solutions to Task #1 and Task #2 in APL.

7) Roger Bell_West shared solutions to Task #1 and Task #2 in Python.

8) Roger Bell_West shared solutions to Task #1 and Task #2 in Ruby.

9) Shawn Wagner shared solutions to Task #1 and Task #2 in OCaml.

10) Shawn Wagner shared solutions to Task #1 and Task #2 in Tcl.

11) Tyler Wardhaugh shared solutions to Task #1 and Task #2 in Clojure.

12) Tyler Wardhaugh shared solutions to Task #1 and Task #2 in Lua.

13) Ulrich Rieke shared solution to Task #1 in Haskell.

14) Walt Mankowski shared solutions to Task #1 and Task #2 in Python.


Please find out past solutions by respected guests. Please do share your creative solutions in other languages.


TASK #1 › Common Factors

Submitted by: Niels van Dijke

You are given 2 positive numbers $M and $N.

Write a script to list all common factors of the given numbers.

Example 1:

Input:
    $M = 12
    $N = 18

Output:
    (1, 2, 3, 6)

Explanation:
    Factors of 12: 1, 2, 3, 4, 6
    Factors of 18: 1, 2, 3, 6, 9

Example 2:

Input:
    $M = 18
    $N = 23

Output:
    (1)

Explanation:
    Factors of 18: 1, 2, 3, 6, 9
    Factors of 23: 1


TASK #2 › Interleave String

Submitted by: Mohammad S Anwar

You are given 3 strings; $A, $B and $C.

Write a script to check if $C is created by interleave $A and $B.

Print 1 if check is success otherwise 0.

Example 1:

Input:
    $A = "XY"
    $B = "X"
    $C = "XXY"

Output: 1

EXPLANATION

"X" (from $B) + "XY" (from $A) = $C

Example 2:

Input:
    $A = "XXY"
    $B = "XXZ"
    $C = "XXXXZY"

Output: 1

EXPLANATION

"XX" (from $A) + "XXZ" (from $B) + "Y" (from $A) = $C

Example 3:

Input:
    $A = "YX"
    $B = "X"
    $C = "XXY"

Output: 0


Last date to submit the solution 23:59 (UK Time) Sunday 18th October 2020.


SO WHAT DO YOU THINK ?

If you have any suggestions or ideas then please do share with us.

Contact with me