The Weekly Challenge - 333

Monday, Aug 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: Straight Line

10. TASK #2: Duplicate Zeros


HEADLINES


Welcome to the Week #333 of The Weekly Challenge.

Back to routine after the break, plenty of super cool contributions. Thanks Team PWC.

Nice to see back to back weeks with 100+ contributios for Week #330 and Week #331.

The last week was very close to the magical figure as well.

Happy Hacking!!


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

  Week      Perl       Raku       Blog   
   328       44       27       22   
   329       46       24       25   
   330       50       29       25   
   331       52       27       23   
   332       44       28       25   

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

  Week      Guests       Contributions       Languages   
   328       11       31       11   
   329       15       46       15   
   330       12       62       19   
   331       13       62       20   
   332       13       64       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     (3514)
 2. Rust       (960)
 3. Ruby       (811)
 4. Haskell    (797)
 5. Lua        (745)
 6. C++        (637)
 7. C          (594)
 8. JavaScript (574)
 9. Go         (519)
10. BQN        (454)

Blogs with Creative Title


  1. An Odd Date by Arne Sommer.

  2. Odd last date letters, binary word list buddy by Bob Lied.

  3. Binary Regularities by Jorg Sommrey.

  4. quick and easy by Luca Ferrari.

  5. Binary + Odd = XOR by Matthias Muth.

  6. Oddly Binary by Packy Anderson.

  7. Base 2 dates and odd words by Peter Campbell Smith.

  8. Odd Date by Roger Bell_West.

  9. I sent my date a letter by Simon Green.

10. Hypertime by Simon Proctor.


GitHub Repository Stats


1. Commits: 44,670 (+96)

2. Pull Requests: 12,416 (+35)

3. Contributors: 262

4. Fork: 333 (+1)

5. Stars: 195



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

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


Task 1: Straight Line

Submitted by: Mohammad Sajid Anwar

You are given a list of co-ordinates.

Write a script to find out if the given points make a straight line.


Example 1

Input: @list = ([2, 1], [2, 3], [2, 5])
Output: true

Example 2

Input: @list = ([1, 4], [3, 4], [10, 4])
Output: true

Example 3

Input: @list = ([0, 0], [1, 1], [2, 3])
Output: false

Example 4

Input: @list = ([1, 1], [1, 1], [1, 1])
Output: true

Example 5

Input: @list = ([1000000, 1000000], [2000000, 2000000], [3000000, 3000000])
Output: true

Task 2: Duplicate Zeros

Submitted by: Mohammad Sajid Anwar

You are given an array of integers.

Write a script to duplicate each occurrence of zero, shifting the remaining elements to the right. The elements beyond the length of the original array are not written.


Example 1

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

Each zero is duplicated.
Elements beyond the original length (like 5 and last 0) are discarded.

Example 2

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

No zeros exist, so the array remains unchanged.

Example 3

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

Example 4

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

Example 5

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


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


SO WHAT DO YOU THINK ?

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

Contact with me