The Weekly Challenge - 277

Monday, Jul 8, 2024| 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: Count Common

10. TASK #2: Strong Pair


HEADLINES


Welcome to the Week #277 of The Weekly Challenge.

Let us welcome new member, Mariano Ortega, an experl Perl hacker from Argentina. He shared his first contributions in Perl.

We have been surprised by Ryan Thompson contribution this week. For the first time, he shared solutions in Python alongwith his regular Perl as well. We even had bonus blog post.

Welcome back Kai Burgdof and thanks for sharing solutions in Perl and JavaScript.

We had another surprise by Kjetil Skotheim as he shared solutions in Perl. Not only this, he also shared solutions to the Week #271 and Week #273. It feels great when I see member sharing past week solutions.

I would also like to mention one more member, Andrew Schneider, who never miss the opportunity to surprise us every week. I really enjoy his choice of guest languages every week. There is a surprise element attach to it. On top, the blog post is worth checking out.

Thank you, Team PWC, for your contributions and encouragements.



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

  Week      Perl       Raku       Blog   
   272       54       30       25   
   273       64       34       26   
   274       45       27       17   
   275       51       25       23   
   276       62       32       27   

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

  Week      Guests       Contributions       Languages   
   272       14       69       22   
   273       17       82       20   
   274       12       58       16   
   275       14       60       19   
   276       16       74       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     (2632)
 2. Ruby       (701)
 3. Haskell    (684)
 4. Rust       (675)
 5. Lua        (620)
 6. C          (559)
 7. C++        (522)
 8. JavaScript (445)
 9. Go         (384)
10. BQN        (336)

Blogs with Creative Title


1. Completed and Maximum Frequency Days by Andrew Schneider.

2. Complete Maximum by Arne Sommer.

3. Hourly Frequencies by Jorg Sommrey.

4. filtering arrays by Luca Ferrari.

5. Complete Maximum Day Frequency by Packy Anderson.

6. Round days and frequent numbers by Peter Campbell Smith.

7. Frequency Day is Complete by Roger Bell_West.

8. Maximum Frequency and now my Day is Complete by Ryan Thompson.

9. Complete frequency by Simon Green.


GitHub Repository Stats


1. Commits: 38,888 (+117)

2. Pull Requests: 10,374 (+42)

3. Contributors: 248 (+1)

4. Fork: 313 (+2)

5. Stars: 173



With start of Week #268, we have a new sponsor Lance Wicks for the entire year 2024. Having said we are looking for more sponsors so that we can go back to weekly winner. If anyone interested please get in touch with us at perlweeklychallenge@yahoo.com. Thanks for your support in advance.


RECAP


Quick recap of The Weekly Challenge - 276 by Mohammad Sajid 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


Mariano Ortega, an expert Perl hacker from Argentina 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 #276.

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


Task 1: Count Common

Submitted by: Mohammad Sajid Anwar

You are given two array of strings, @words1 and @words2.

Write a script to return the count of words that appears in both arrays exactly once.

Example 1

Input: @words1 = ("Perl", "is", "my", "friend")
       @words2 = ("Perl", "and", "Raku", "are", "friend")
Output: 2

The words "Perl" and "friend" appear once in each array.

Example 2

Input: @words1 = ("Perl", "and", "Python", "are", "very", "similar")
       @words2 = ("Python", "is", "top", "in", "guest", "languages")
Output: 1

Example 3

Input: @words1 = ("Perl", "is", "imperative", "Lisp", "is", "functional")
       @words2 = ("Crystal", "is", "similar", "to", "Ruby")
Output: 0

Task 2: Strong Pair

Submitted by: Mohammad Sajid Anwar

You are given an array of integers, @ints.

Write a script to return the count of all strong pairs in the given array.

A pair of integers x and y is called strong pair if it satisfies: 0 < |x - y| < min(x, y).

Example 1

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

Strong Pairs: (2, 3), (3, 4), (3, 5), (4, 5)

Example 2

Input: @ints = (5, 7, 1, 7)
Ouput: 1

Strong Pairs: (5, 7)


Last date to submit the solution 23:59 (UK Time) Sunday 14th July 2024.


SO WHAT DO YOU THINK ?

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

Contact with me