The Weekly Challenge - 243

Monday, Nov 13, 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: Reverse Pairs

10. TASK #2: Floor Sum


HEADLINES


Welcome to the Week #243 of The Weekly Challenge.

Let us all welcome two new members to Team PWC i.e. Robert McIntosh and Nelo Tovar.

We received the first blog post by Robert McIntosh.

Nelo Tovar shared his first contributions to the Task #1 and Task #2 in Perl.

Please do checkout the interview with the latest champion, Packy Anderson.



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

  Week      Perl       Raku       Blog   
   238       60       37       29   
   239       59       41       28   
   240       62       36       26   
   241       59       31       24   
   242       57       37       32   

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

  Week      Guests       Contributions       Languages   
   238       15       79       24   
   239       20       84       24   
   240       17       85       26   
   241       14       68       21   
   242       14       57       20   

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     (1961)
 2. Ruby       (619)
 3. Haskell    (606)
 4. Lua        (544)
 5. Rust       (461)
 6. C          (457)
 7. C++        (435)
 8. BQN        (315)
 9. Go         (295)
10. JavaScript (285)

Blogs with Creative Title


1. Missing Flips by Adam Russell.

2. Missing Matrix by Arne Sommer.

3. Missing Members by Augie De Black Jr.

4. Flip the Script by Bob Lied.

5. Like The Deserts Miss The Rain by Dave Jacoby.

6. I’m a Map by Ian Rifkin.

7. Missing Reversed Inversions by Jorg Sommrey.

8. grepping the arrays for fun and profit! by Luca Ferrari.

9. Checking and Flipping by Matthias Muth.

10. Flip the Missing Matrix Members by Packy Anderson.

11. Flipping Members by Peter Campbell Smith.

12. One Of Our Matrices Is Missing by Roger Bell_West.


GitHub Repository Stats


1. Commits: 35,107 (+115)

2. Pull Requests: 89,037 (+43)

3. Contributors: 238 (+1)

4. Fork: 300

5. Stars: 163



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 - 242 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


1. Robert McIntosh, an experienced Raku hacker from USA, joined the Team PWC.

2. Nelo Tovar, an experienced Perl hacker joined the Tean PWC.


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 #242.

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


Task 1: Reverse Pairs

Submitted by: Mohammad S Anwar

You are given an array of integers.

Write a script to return the number of reverse pairs in the given array.

A reverse pair is a pair (i, j) where: a) 0 <= i < j < nums.length and b) nums[i] > 2 * nums[j].

Example 1

Input: @nums = (1, 3, 2, 3, 1)
Output: 2

(1, 4) => nums[1] = 3, nums[4] = 1, 3 > 2 * 1
(3, 4) => nums[3] = 3, nums[4] = 1, 3 > 2 * 1

Example 2

Input: @nums = (2, 4, 3, 5, 1)
Output: 3

(1, 4) => nums[1] = 4, nums[4] = 1, 4 > 2 * 1
(2, 4) => nums[2] = 3, nums[4] = 1, 3 > 2 * 1
(3, 4) => nums[3] = 5, nums[4] = 1, 5 > 2 * 1

Task 2: Floor Sum

Submitted by: Mohammad S Anwar

You are given an array of positive integers (>=1).

Write a script to return the sum of floor(nums[i] / nums[j]) where 0 <= i,j < nums.length. The floor() function returns the integer part of the division.


Example 1

Input: @nums = (2, 5, 9)
Output: 10

floor(2 / 5) = 0
floor(2 / 9) = 0
floor(5 / 9) = 0
floor(2 / 2) = 1
floor(5 / 5) = 1
floor(9 / 9) = 1
floor(5 / 2) = 2
floor(9 / 2) = 4
floor(9 / 5) = 1

Example 2

Input: @nums = (7, 7, 7, 7, 7, 7, 7)
Output: 49


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


SO WHAT DO YOU THINK ?

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

Contact with me