The Weekly Challenge - 309

Monday, Feb 17, 2025| 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: Min Gap

10. TASK #2: Min Diff


HEADLINES


Welcome to the Week #309 of The Weekly Challenge.

Once again, the guest contributions is giving tough fight to regular contributions. It feels great to see such a strong support for so many guest languages. I am still waiting for the first 100+ contributions week of new year 2025. I am confident, it would happen very soon.


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

  Week      Perl       Raku       Blog   
   304       40       21       14   
   305       44       21       21   
   306       39       18       10   
   307       44       20       12   
   308       44       21       16   

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

  Week      Guests       Contributions       Languages   
   304       9       49       21   
   305       9       46       17   
   306       9       40       15   
   307       15       61       23   
   308       13       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     (3199)
 2. Rust       (848)
 3. Ruby       (771)
 4. Haskell    (747)
 5. Lua        (688)
 6. C          (590)
 7. C++        (589)
 8. JavaScript (534)
 9. Go         (458)
10. BQN        (414)

Blogs with Creative Title


1. Exclusive or Common by Arne Sommer.

2. Common Encodings by Jorg Sommrey.

3. lazyness by Luca Ferrari.

4. Avoid Common Traps, and Reduce the XOR by Matthias Muth.

5. AND and XOR by Peter Campbell Smith.

6. Count Xor, ha ha ha by Roger Bell_West.

7. Counting the XOR by Simon Green.


GitHub Repository Stats


1. Commits: 42,319 (+94)

2. Pull Requests: 11,570 (+36)

3. Contributors: 257

4. Fork: 324 (+1)

5. Stars: 186 (+1)



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

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


Task 1: Min Gap

Submitted by: Mohammad Sajid Anwar

You are given an array of integers, @ints, increasing order.

Write a script to return the element before which you find the smallest gap.

Example 1

Input: @ints = (2, 8, 10, 11, 15)
Output: 11

 8 - 2  => 6
10 - 8  => 2
11 - 10 => 1
15 - 11 => 4

11 is where we found the min gap.

Example 2

Input: @ints = (1, 5, 6, 7, 14)
Output: 6

 5 - 1 => 4
 6 - 5 => 1
 7 - 6 => 1
14 - 7 => 7

6 and 7 where we found the min gap, so we pick the first instance.

Example 3

Input: @ints = (8, 20, 25, 28)
Output: 28

 8 - 20 => 14
25 - 20 => 5
28 - 25 => 3

28 is where we found the min gap.

Task 2: Min Diff

Submitted by: Mohammad Sajid Anwar

You are given an array of integers, @ints.

Write a script to find the minimum difference between any two elements.

Example 1

Input: @ints = (1, 5, 8, 9)
Output: 1

1, 5 => 5 - 1 => 4
1, 8 => 8 - 1 => 7
1, 9 => 9 - 1 => 8
5, 8 => 8 - 5 => 3
5, 9 => 9 - 5 => 4
8, 9 => 9 - 8 => 1

Example 2

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

9, 4 => 9 - 4 => 5
9, 1 => 9 - 1 => 8
9, 7 => 9 - 7 => 2
4, 1 => 4 - 1 => 3
4, 7 => 7 - 4 => 3
1, 7 => 7 - 1 => 6


Last date to submit the solution 23:59 (UK Time) Sunday 23rd February 2025.


SO WHAT DO YOU THINK ?

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

Contact with me