The Weekly Challenge - 088

Monday, Nov 23, 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: Array of Product

9. TASK #2: Spiral Matrix


HEADLINES


With the launch of The Weekly Challenge - 088, we have now completed 20 months. It has been fun and entertaining journey. It gave us the opportunity to meet the best brain across the globe. I never dreamt of knowing so many experts and be among their friends.

Just want to update about my ongoing therapy for my Depression & Anxiety, I have had 2 sessions so far, 4 more sessions to go. It has made some positive changes but still far from full recovery. I understand it is going to take long time. One of the issue that I face on a regular basis is that I hate meeting people. I prefer sitting alone and doing nothing. At times, I feel bad not taking part in the weekly challenge. I miss my live video sessions. I miss asking silly Raku questions on Twitter. Interacting with so many Raku experts always felt nice. They have all been very nice and kind to me. I just hope that I don’t forget all that I learnt so far.

Contributions Summary

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

Languages Summary


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

1) Commits: 11,597 (+228)

2) Pull Requests: 2,821 (+48)

3) Contributors: 143

4) Fork: 181 (+1)

5) Stars: 83


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 - 087” by Mohammad S Anwar.


PERL REVIEW


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


RAKU REVIEW


Please checkout Raku solutions review of the “The Weekly Challenge - 084” 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


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) Abigail shared solution to Task #1 in C.

2) Abigail shared solutions to Task #1 and Task #2 in Node.

3) Cheok-Yin Fung shared solution to Task #1 in Lisp.

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

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

6) Myoungjin Jeon shared solution to Task #1 in Haskell.

7) Myoungjin Jeon shared solutions to Task #1 and Task #2 in Lisp.

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

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

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

11) Roger Bell_West shared solutions to Task #1 and Task #2 in Rust.

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

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


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


TASK #1 › Array of Product

Submitted by: Mohammad S Anwar

You are given an array of positive integers @N.

Write a script to return an array @M where $M[i] is the product of all elements of @N except the index $N[i].

Example 1:

Input:
    @N = (5, 2, 1, 4, 3)
Output:
    @M = (24, 60, 120, 30, 40)

    $M[0] = 2 x 1 x 4 x 3 = 24
    $M[1] = 5 x 1 x 4 x 3 = 60
    $M[2] = 5 x 2 x 4 x 3 = 120
    $M[3] = 5 x 2 x 1 x 3 = 30
    $M[4] = 5 x 2 x 1 x 4 = 40

Example 2:

Input:
    @N = (2, 1, 4, 3)
Output:
    @M = (12, 24, 6, 8)

    $M[0] = 1 x 4 x 3 = 12
    $M[1] = 2 x 4 x 3 = 24
    $M[2] = 2 x 1 x 3 = 6
    $M[3] = 2 x 1 x 4 = 8


TASK #2 › Spiral Matrix

Submitted by: Mohammad S Anwar

You are given m x n matrix of positive integers.

Write a script to print spiral matrix as list.

Example 1:

Input:
    [ 1, 2, 3 ]
    [ 4, 5, 6 ]
    [ 7, 8, 9 ]
Ouput:
    [ 1, 2, 3, 6, 9, 8, 7, 4, 5 ]

Example 2:

Input:
    [  1,  2,  3,  4 ]
    [  5,  6,  7,  8 ]
    [  9, 10, 11, 12 ]
    [ 13, 14, 15, 16 ]
Output:
    [ 1, 2, 3, 4, 8, 12, 16, 15, 14, 13, 9, 5, 6, 7, 11, 10 ]


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


SO WHAT DO YOU THINK ?

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

Contact with me