The Weekly Challenge - 242

Monday, Nov 6, 2023| Tags: Perl, Raku

TABLE OF CONTENTS


01. HEADLINES

02. SPONSOR

03. RECAP

04. PERL REVIEW

05. RAKU REVIEW

06. CHART

07. NEW MEMBERS

08. GUESTS

09. TASK #1: Missing Members

10. TASK #2: Flip Matrix


HEADLINES


Welcome to the Week #242 of The Weekly Challenge.

Once again, it is time to declare the next champion as today is the first monday of the month. With great pleasure, I announce Packy Anderson as the next champion of the weekly challenge. He joined the Team PWC in the Week #227. As of today he contributed 30 Perl, 30 Raku, 18 Python, 8 Java and 15 blogs.

As you all know, we run our own Advent Calendar every year. We will continue the tradition this year too. If you want your favourite blog post to be part of this year calendar then please do share the link with us (perlweeklychallenge@yahoo.com).

Last 5 weeks mainstream contribution stats. Thank you Team PWC for your support and encouragements.

  Week      Perl       Raku       Blog   
   237       48       34       26   
   238       60       37       29   
   239       59       41       28   
   240       62       36       26   
   241       54       31       24   

Last 5 weeks guest contribution stats. Thank you each and every guest contributors for your time and efforts.

  Week      Guests       Contributions       Languages   
   237       14       54       16   
   238       15       79       24   
   239       20       84       24   
   240       18       89       26   
   241       14       68       21   

TOP 10 Guest Languages


Do you see your favourite language in the Top 10? If not then why not contribute regularly and make it to the top.

 1. Python     (1947)
 2. Ruby       (617)
 3. Haskell    (604)
 4. Lua        (542)
 5. Rust       (457)
 6. C          (455)
 7. C++        (431)
 8. BQN        (315)
 9. Go         (293)
10. JavaScript (281)

Blogs with Creative Title


1. Recursive Loops and Code Re-Use by Adam Russell.

2. Arithmetic Prime by Arne Sommer.

3. Math is hard? by Ian Rifkin.

4. loops everywhere! by Luca Ferrari.

5. Triplets Prime by Packy Anderson.

6. Triplets and factors by Peter Campbell Smith.

7. Prime Triplets by Roger Bell_West.

8. Triplets and Sorting by Simon Green.


GitHub Repository Stats


1. Commits: 34,992 (+110)

2. Pull Requests: 8,994 (+42)

3. Contributors: 237

4. Fork: 300 (+1)

5. Stars: 164



Our solo sponsor Pete Sergeant has been a great support to keep us motivated. We are lucky that he agreed to continue the journey with us in the year 2023. I would like to personally thank Pete and his entire team for their generosity. It would be great if we could add few more to sponsor the prize money so that we could go back and declare weekly champions as we have done in the past. I hope and wish this will become possible in 2023. The amount doesn’t have to be huge. However, it would be nice to show off bunch of supporters. If an organisation comes forward and supports us then that would be the ultimate achievement.


RECAP


Quick recap of The Weekly Challenge - 241 by Mohammad S Anwar.


PERL REVIEW


If you missed any past reviews then please check out the collection.


RAKU REVIEW


If you missed any past reviews then please check out 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 try the excellent tool EZPWC created by respected member Saif Ahmed of Team PWC.


GUESTS


Please check out the guest contributions for the Week #241.

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


Task 1: Missing Members

Submitted by: Mohammad S Anwar

You are given two arrays of integers.

Write a script to find out the missing members in each other arrays.

Example 1

Input: @arr1 = (1, 2, 3)
       @arr2 = (2, 4, 6)
Output: ([1, 3], [4, 6])

(1, 2, 3) has 2 members (1, 3) missing in the array (2, 4, 6).
(2, 4, 6) has 2 members (4, 6) missing in the array (1, 2, 3).

Example 2

Input: @arr1 = (1, 2, 3, 3)
       @arr2 = (1, 1, 2, 2)
Output: ([3])

(1, 2, 3, 3) has 2 members (3, 3) missing in the array (1, 1, 2, 2). Since they are same, keep just one.
(1, 1, 2, 2) has 0 member missing in the array (1, 2, 3, 3).

Task 2: Flip Matrix

Submitted by: Mohammad S Anwar

You are given n x n binary matrix.

Write a script to flip the given matrix as below.


1 1 0
0 1 1
0 0 1

a) Reverse each row

0 1 1
1 1 0
1 0 0

b) Invert each member

1 0 0
0 0 1
0 1 1

Example 1

Input: @matrix = ([1, 1, 0], [1, 0, 1], [0, 0, 0])
Output: ([1, 0, 0], [0, 1, 0], [1, 1, 1])

Example 2

Input: @matrix = ([1, 1, 0, 0], [1, 0, 0, 1], [0, 1, 1, 1], [1, 0, 1, 0])
Output: ([1, 1, 0, 0], [0, 1, 1, 0], [0, 0, 0, 1], [1, 0, 1, 0])


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


SO WHAT DO YOU THINK ?

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

Contact with me