The Weekly Challenge - 237

Monday, Oct 2, 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: Seize The Day

10. TASK #2: Maximise Greatness


HEADLINES


Welcome to the Week #237 of The Weekly Challenge.

I finally managed to get the interview done with the champion, Mariano Spadaccini. A polite reminder to all champions who haven’t responded the interview request. Please do share your story with us when you get time. Please do let me know if you didn’t get the invitation from me.

Today is the first Monday of the month and time to declare the next champion. I am happy to announce Robbie Hatley as our next champion. He joined the Team PWC in the Week #098. As of today, he has contributed 98 Perl solutions and 37 blogs.

Flavio Poletti, our elite member, surprised me by his comeback and shared his contributions to the Week #229.

For some strange reasons, I didn’t get the contributions by Arne Sommer and Packy Anderson. So I did little walk around and pulled the contributions manually. I hope it is ethically acceptable.

In the past, we have received contributions from team members while they are on holiday. One even contributed from the hospital bed and her name was Joelle Maslak. So keeping the tradition alive, Jorg Sommrey has been contributing from his vacation.

Ulrich Rieke is one of the few who always encourage us with kind words and his bouquet of different languages week after week.

As you all know, Laurent Rosenfeld, holding the Rank #1 with the total score 2352. He has been with us since the beginning. What a consistent contributors he is.

I would also like to thank Mark Anderson for helping with the suggested tasks. It is a big help as finding new task every week is a big job. Thanks to the Early Bird Club members for helping with task review. Your contributions are priceless.

Just to let all members know, your weekly contributions as pull request can be part of the Hacktoberfest challenge. So if you haven’t signed up yet then please do so soon. We are officially part of the Hacktoberfest this year too.

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

  Week      Perl       Raku       Blog   
   231       68       40       31   
   233       60       35       29   
   234       52       35       24   
   235       61       34       24   
   236       49       30       27   

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

  Week      Guests       Contributions       Languages   
   231       18       83       24   
   233       15       59       16   
   234       12       48       15   
   235       14       78       23   
   236       12       62       20   

TOP 10 Guest Languages


Congratulation to all Ruby contributors. It has moved up to Rank #2.

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     (1847)
 2. Ruby       (596)
 3. Haskell    (590)
 4. Lua        (522)
 5. C          (441)
 6. Rust       (435)
 7. C++        (410)
 8. BQN        (309)
 9. Go         (278)
10. JavaScript (266)

Blogs with Creative Title


1. Exact Array Loops by Adam Russell.

2. Changing Loops by Arne Sommer.

3. Lemonade Stand by Avery Adams.

4. A Change Would Do You Good by Bob Lied.

5. The Circle Is Small by Bob Lied.

6. Arrays and Loops by Luca Ferrari.

7. Bills in Loops, and Loops in Arrays by Matthias Muth.

8. Change and loops by Peter Campbell Smith.

9. Change for the Machines by Roger Bell_West.


GitHub Repository Stats


1. Commits: 34,442 (+107)

2. Pull Requests: 8,782 (+35)

3. Contributors: 232

4. Fork: 291 (+1)

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

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


Task 1: Seize The Day

Submitted by: Mark Anderson

Given a year, a month, a weekday of month, and a day of week (1 (Mon) .. 7 (Sun)), print the day.


Example 1

Input: Year = 2024, Month = 4, Weekday of month = 3, day of week = 2
Output: 16

The 3rd Tue of Apr 2024 is the 16th

Example 2

Input: Year = 2025, Month = 10, Weekday of month = 2, day of week = 4
Output: 9

The 2nd Thu of Oct 2025 is the 9th

Example 3

Input: Year = 2026, Month = 8, Weekday of month = 5, day of week = 3
Output: 0

There isn't a 5th Wed in Aug 2026

Task 2: Maximise Greatness

Submitted by: Mohammad S Anwar

You are given an array of integers.

Write a script to permute the give array such that you get the maximum possible greatness.


To determine greatness, nums[i] < perm[i] where 0 <= i < nums.length


Example 1

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

One possible permutation: (2, 5, 1, 3, 3, 1, 1) which returns 4 greatness as below:
nums[0] < perm[0]
nums[1] < perm[1]
nums[3] < perm[3]
nums[4] < perm[4]

Example 2

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

One possible permutation: (2, 3, 4, 1) which returns 3 greatness as below:
nums[0] < perm[0]
nums[1] < perm[1]
nums[2] < perm[2]


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


SO WHAT DO YOU THINK ?

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

Contact with me