The Weekly Challenge - 320

Sunday, May 4, 2025| Tags: Perl, Raku

TABLE OF CONTENTS


  1. HEADLINES

  2. SPONSOR

  3. RECAP

  4. PERL REVIEW

  5. RAKU REVIEW

  6. CHART

  7. NEW MEMBERS

  8. GUESTS

  9. TASK #1: Maximum Count

10. TASK #2: Sum Difference


HEADLINES


Welcome to the Week #320 of The Weekly Challenge.

This edition of the weekly challenge comes to you from Germany as I am attending the Perl Toolchain Summit 2025 in Leipzig.

Since I will be traveling back home on Sunday night, there may be a few missing bits when the challenge goes live.

Don’t worry, I’ll patch things up by Monday afternoon once I’ve arrived home.

In the meantime, you’ve got the challenge to play with, so please keep the momentum going!

We’re excited to welcome a new member, HVukman to Team PWC.

Thank you, HVukman, for sharing your first contributions in K.

Tomorrow marks the first Monday of the month and time for our monthly ritual!

I’m pleased to announce, Vinod Kumar K, as our next Champion of the Month.

A gentle reminder to last month’s champion, Eric Cheung, I’m still waiting for PayPal details.

Vinod and Eric, please share your PayPal account information and preferred currency for the prize money.

Thank you, Roger, for adding another programming language, Typst to our list of guest languages. It looks simple and easy to use.

Keep Hacking and sharing knowledge!


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

  Week      Perl       Raku       Blog   
   315       42       17       14   
   316       50       23       18   
   317       48       21       17   
   318       42       21       17   
   319       36       18       14   

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

  Week      Guests       Contributions       Languages   
   315       12       56       20   
   316       11       52       19   
   317       10       50       17   
   318       10       48       16   
   319       12       54       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     (3347)
 2. Rust       (898)
 3. Ruby       (793)
 4. Haskell    (771)
 5. Lua        (716)
 6. C++        (611)
 7. C          (590)
 8. JavaScript (556)
 9. Go         (481)
10. BQN        (434)

Blogs with Creative Title


1. Common Count by Arne Sommer.

2. Common Vowels by Jorg Sommrey.

3. Does ‘Weekly’ Have a Happy (Vowel) Ending? by Matthias Muth.

4. Count the Minimum Common Word by Packy Anderson.

5. Vowels and minima by Peter Campbell Smith.

6. Minimum Words Count Even If They Are Common by Roger Bell_West.

7. Words and numbers by Simon Green.


GitHub Repository Stats


1. Commits: 43,339 (+70)

2. Pull Requests: 11,949 (+27)

3. Contributors: 259 (+1)

4. Fork: 326

5. Stars: 189



With start of Week #268, we have a new sponsor Lance Wicks until the end of year 2025. 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 - 319 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


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

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


Task 1: Maximum Count

Submitted by: Mohammad Sajid Anwar

You are given an array of integers.

Write a script to return the maximum between the number of positive and negative integers. Zero is neither positive nor negative.


Example 1

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

There are 3 positive integers.
There are 3 negative integers.
The maximum between 3 and 3 is 3.

Example 2

Input: @ints = (-2, -1, 0, 0, 1)
Output: 2

There are 1 positive integers.
There are 2 negative integers.
The maximum between 2 and 1 is 2.

Example 3

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

There are 4 positive integers.
There are 0 negative integers.
The maximum between 4 and 0 is 4.

Task 2: Sum Difference

Submitted by: Mohammad Sajid Anwar

You are given an array of positive integers.

Write a script to return the absolute difference between digit sum and element sum of the given array.


Example 1

Input: @ints = (1, 23, 4, 5)
Output: 18

Element sum: 1 + 23 + 4 + 5 => 33
Digit sum: 1 + 2 + 3 + 4 + 5 => 15
Absolute difference: | 33 - 15 | => 18

Example 2

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

Element sum: 1 + 2 + 3 + 4 + 5 => 15
Digit sum: 1 + 2 + 3 + 4 + 5 => 15
Absolute difference: | 15 - 15 | => 0

Example 3

Input: @ints = (1, 2, 34)
Output: 27

Element sum: 1 + 2 + 34 => 37
Digit sum: 1 + 2 + 3 + 4 => 10
Absolute difference: | 37 - 10 | => 27


Last date to submit the solution 23:59 (UK Time) Sunday 11th May 2025.


SO WHAT DO YOU THINK ?

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

Contact with me