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: Arrange Binary
10. TASK #2: Maximum Average
HEADLINES
Welcome to the Week #304
of The Weekly Challenge
.
Year 2024
ends with yet another power packed contributions. Except year 2021
, every year we had more than 5K
contributions where we had full year. Even in the year 2021
, it was just 24
less than the magic number.
Year 2024: 5453
Year 2023: 5702
Year 2022: 5375
Year 2021: 4976
Year 2020: 5187
The breakdown of overall contributions:
Perl: 15801
Raku: 8881
Blog: 5584
With regard to the guest contributions, year 2024
was the best year so far where we had full year. Each year had more than 1K
contributions.
Year 2024: 3265
Year 2023: 2629
Year 2022: 3002
Year 2021: 2840
Year 2020: 1280
As for guest languages, Python
is holding the #1
position for the longest period with total contributions 3143
. You can see how strong the position as the #2
position is taken by Rust
with total contributions 828
.
Let’s keep contributing and spreading the word among your friends and colleagues.
Last 5 weeks
mainstream contribution stats. Thank you Team PWC
for your support and encouragements.
Week |
Perl |
Raku |
Blog |
299 |
37 | 13 | 10 |
300 |
41 | 19 | 16 |
301 |
45 | 18 | 13 |
302 |
37 | 20 | 16 |
303 |
38 | 18 | 12 |
Last 5 weeks
guest contribution stats. Thank you each and every guest contributors for your time and efforts.
Week |
Guests |
Contributions |
Languages |
299 |
10 | 45 | 19 |
300 |
10 | 42 | 16 |
301 |
9 | 39 | 15 |
302 |
12 | 48 | 19 |
303 |
8 | 37 | 15 |
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 (3143)
2. Rust (828)
3. Ruby (761)
4. Haskell (737)
5. Lua (678)
6. C (590)
7. C++ (579)
8. JavaScript (524)
9. Go (448)
10. BQN (406)
Blogs with Creative Title
1. Delete and Even by Arne Sommer.
2. See Other by Dave Jacoby.
3. Earn Evenly by Jorg Sommrey.
4. Even and earn by Peter Campbell Smith.
5. Can Even Digits Earn? by Roger Bell_West.
6. Earn with 3 digits by Simon Green.
GitHub Repository Stats
1. Commits: 41,901 (+75
)
2. Pull Requests: 11,417 (+27
)
3. Contributors: 256
4. Fork: 323
5. Stars: 181
SPONSOR
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 - 303 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 #303.
Please find past solutions by respected guests. Please share your creative solutions in other languages.
Task 1: Arrange Binary
Submitted by: Mohammad Sajid Anwar
You are given a list of binary digits (0 and 1) and a positive integer, $n
.
Write a script to return true if you can re-arrange the list by replacing at least $n
digits with 1
in the given list so that no two consecutive digits are 1
otherwise return false.
Example 1
Input: @digits = (1, 0, 0, 0, 1), $n = 1
Output: true
Re-arranged list: (1, 0, 1, 0, 1)
Example 2
Input: @digits = (1, 0, 0, 0, 1), $n = 2
Output: false
Task 2: Maximum Average
Submitted by: Mohammad Sajid Anwar
You are given an array of integers, @ints
and an integer, $n
which is less than or equal to total elements in the given array.
Write a script to find the contiguous subarray whose length is the given integer, $n
, and has the maximum average. It should return the average.
Example 1
Input: @ints = (1, 12, -5, -6, 50, 3), $n = 4
Output: 12.75
Subarray: (12, -5, -6, 50)
Average: (12 - 5 - 6 + 50) / 4 = 12.75
Example 2
Input: @ints = (5), $n = 1
Output: 5
Last date to submit the solution 23:59 (UK Time) Sunday 19th January 2025.