The Weekly Challenge - 234

Monday, Sep 11, 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: Common Characters

10. TASK #2: Unequal Triplets


HEADLINES


Welcome to the Week #234 of The Weekly Challenge.

Let us all welcome, mauke, an expert in Perl to the Team PWC.

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

  Week      Perl       Raku       Blog   
   228       58       28       24   
   229       57       30       24   
   230       62       32       25   
   231       68       38       31   
   233       60       35       29   

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

  Week      Guests       Contributions       Languages   
   228       15       57       18   
   229       13       55       17   
   230       15       54       20   
   231       18       83       24   
   233       15       59       16   

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     (1796)
 2. Haskell    (584)
 3. Ruby       (580)
 4. Lua        (514)
 5. C          (437)
 6. Rust       (424)
 7. C++        (404)
 8. BQN        (305)
 9. Go         (270)
10. JavaScript (259)

Blogs with Creative Title


1. What’s the Similar Frequency, Kenneth? by Adam Russell.

2. Words of a Sort by Arne Sommer.

3. PWC 233 Data on the side by Bob Lied.

4. Sorting, by similarity and frequency by Luca Ferrari.

5. Tune in to the right frequency! by Matthias Muth.

6. What’s the Frequency, Kenneth? by Packy Anderson.

7. Similar words and a rather strange ordering by Peter Campbell Smith.

8. Similar Frequency by Roger Bell_West.

9. Similar frequency by Simon Green.


GitHub Repository Stats


1. Commits: 34,124 (+116)

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

3. Contributors: 229 (+2)

4. Fork: 288

5. Stars: 162



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


mauke, an expert Perl hacker joined the Team 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 #233.

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


Task 1: Common Characters

Submitted by: Mohammad S Anwar

You are given an array of words made up of alphabetic characters only.

Write a script to return all alphabetic characters that show up in all words including duplicates.

Example 1

Input: @words = ("java", "javascript", "julia")
Output: ("j", "a")

Example 2

Input: @words = ("bella", "label", "roller")
Output: ("e", "l", "l")

Example 3

Input: @words = ("cool", "lock", "cook")
Output: ("c", "o")

Task 2: Unequal Triplets

Submitted by: Mohammad S Anwar

You are given an array of positive integers.

Write a script to find the number of triplets (i, j, k) that satisfies num[i] != num[j], num[j] != num[k] and num[k] != num[i].

Example 1

Input: @ints = (4, 4, 2, 4, 3)
Ouput: 3

(0, 2, 4) because 4 != 2 != 3
(1, 2, 4) because 4 != 2 != 3
(2, 3, 4) because 2 != 4 != 3

Example 2

Input: @ints = (1, 1, 1, 1, 1)
Ouput: 0

Example 3

Input: @ints = (4, 7, 1, 10, 7, 4, 1, 1)
Output: 28

triplets of 1, 4, 7  = 3x2×2 = 12 combinations
triplets of 1, 4, 10 = 3×2×1 = 6  combinations
triplets of 4, 7, 10 = 2×2×1 = 4  combinations
triplets of 1, 7, 10 = 3x2x1 = 6 combinations


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


SO WHAT DO YOU THINK ?

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

Contact with me