The Weekly Challenge - 241

Monday, Oct 30, 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: Arithmetic Triplets

10. TASK #2: Prime Order


HEADLINES


Welcome to the Week #241 of The Weekly Challenge.

Last week, I shared a report by rcmlz about Raku Benchmark Scabality. It created buzz among Team PWC members. It is always nice to hear positive response. Unfortunately I didn’t get the report for the Week #240.

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

  Week      Perl       Raku       Blog   
   236       51       34       29   
   237       48       34       26   
   238       60       37       29   
   239       59       41       28   
   240       62       36       26   

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

  Week      Guests       Contributions       Languages   
   236       14       62       20   
   237       14       54       16   
   238       15       79       24   
   239       20       84       24   
   240       18       89       26   

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     (1931)
 2. Ruby       (613)
 3. Haskell    (602)
 4. Lua        (536)
 5. Rust       (453)
 6. C          (449)
 7. C++        (423)
 8. BQN        (313)
 9. Go         (289)
10. JavaScript (279)

Blogs with Creative Title


1. ABA (Acronym Build Array) by Adam Russell.

2. An Attempt to Simplify Fails, But Works by Augie De Blieck Jr.

3. Acronymous Array by Arne Sommer.

4. Just a slice. No loop, please. I’ll eat it here. by Bob Lied.

5. A.A.B.A. (Acronym And Build Array) by Ian Rifkin.

6. Short Acronyms, and Short Solutions by Matthias Muth.

7. Building Acronym Arrays by Packy Anderson.

8. Initialisms and contorted arrays by Peter Campbell Smith.

9. Building Acronyms by Roger Bell_West.


GitHub Repository Stats


1. Commits: 34,882 (+107)

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

3. Contributors: 237

4. Fork: 299 (+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 - 240 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 #240.

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


Task 1: Arithmetic Triplets

Submitted by: Mohammad S Anwar

You are given an array (3 or more members) of integers in increasing order and a positive integer.

Write a script to find out the number of unique Arithmetic Triplets satisfying the following rules:

a) i < j < k
b) nums[j] - nums[i] == diff
c) nums[k] - nums[j] == diff

Example 1

Input: @nums = (0, 1, 4, 6, 7, 10)
       $diff = 3
Output: 2

Index (1, 2, 4) is an arithmetic triplet because both  7 - 4 == 3 and 4 - 1 == 3.
Index (2, 4, 5) is an arithmetic triplet because both 10 - 7 == 3 and 7 - 4 == 3.

Example 2

Input: @nums = (4, 5, 6, 7, 8, 9)
       $diff = 2
Output: 2

(0, 2, 4) is an arithmetic triplet because both 8 - 6 == 2 and 6 - 4 == 2.
(1, 3, 5) is an arithmetic triplet because both 9 - 7 == 2 and 7 - 5 == 2.

Task 2: Prime Order

Submitted by: Mohammad S Anwar

You are given an array of unique positive integers greater than 2.

Write a script to sort them in ascending order of the count of their prime factors, tie-breaking by ascending value.

Example 1

Input: @int = (11, 8, 27, 4)
Output: (11, 4, 8, 27))

Prime factors of 11 => 11
Prime factors of  4 => 2, 2
Prime factors of  8 => 2, 2, 2
Prime factors of 27 => 3, 3, 3


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


SO WHAT DO YOU THINK ?

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

Contact with me