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: String Compression
10. TASK #2: Matchstick Square
HEADLINES
Welcome to the Week #296
of The Weekly Challenge
.
Welcome back, Luca Ferrari
and thanks for sharing solutions in Raku, Python, Java and PostgreSQL.
Over the last couple of weeks, I’ve noticed a slightly slower pace of participation. Could it be that the holiday season has already kicked in? That said, there are still plenty of contributions in various languages. On top of that, we’ve received some very technical blog posts from the usual suspects. Well done team, keep sharing your knowledge and experiences with us!
Last 5 weeks
mainstream contribution stats. Thank you Team PWC
for your support and encouragements.
Week |
Perl |
Raku |
Blog |
291 |
52 | 25 | 15 |
292 |
35 | 13 | 14 |
293 |
57 | 26 | 15 |
294 |
37 | 21 | 10 |
295 |
45 | 20 | 24 |
Last 5 weeks
guest contribution stats. Thank you each and every guest contributors for your time and efforts.
Week |
Guests |
Contributions |
Languages |
291 |
12 | 44 | 18 |
292 |
8 | 27 | 14 |
293 |
12 | 54 | 16 |
294 |
11 | 50 | 18 |
295 |
11 | 49 | 18 |
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 (3052)
2. Rust (792)
3. Ruby (745)
4. Haskell (721)
5. Lua (662)
6. C (589)
7. C++ (563)
8. JavaScript (508)
9. Go (432)
10. BQN (387)
Blogs with Creative Title
1. Break the Jump by Arne Sommer.
2. Taking A Break From All Your Worries by Dave Jacoby.
3. Jumping Words by Jorg Sommrey.
4. loops and substitutions by Luca Ferrari.
5. Jump, but Don’t Break the Game by Matthias Muth.
6. Spaced out jumps by Peter Campbell Smith.
7. Jump and Break by Roger Bell_West.
8. The Break Game by Simon Green.
GitHub Repository Stats
1. Commits: 41,171 (+74
)
2. Pull Requests: 11,160 (+28
)
3. Contributors: 253
4. Fork: 320
5. Stars: 177
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 - 295 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 #295.
Please find past solutions by respected guests. Please share your creative solutions in other languages.
Task 1: String Compression
Submitted by: Mohammad Sajid Anwar
You are given a string of alphabetic characters, $chars
.
Write a script to compress the string with run-length encoding, as shown in the examples.
A compressed unit can be either a single character or a count followed by a character.
BONUS: Write a decompression function.
Example 1
Input: $chars = "abbc"
Output: "a2bc"
Example 2
Input: $chars = "aaabccc"
Output: "3ab3c"
Example 3
Input: $chars = "abcc"
Output: "ab2c"
Task 2: Matchstick Square
Submitted by: Mohammad Sajid Anwar
You are given an array of integers, @ints
.
Write a script to find if it is possible to make one square using the sticks as in the given array @ints
where $ints[ì]
is the length of i
th stick.
Example 1
Input: @ints = (1, 2, 2, 2, 1)
Output: true
Top: $ints[1] = 2
Bottom: $ints[2] = 2
Left: $ints[3] = 2
Right: $ints[0] and $ints[4] = 2
Example 2
Input: @ints = (2, 2, 2, 4)
Output: false
Example 3
Input: @ints = (2, 2, 2, 2, 4)
Output: false
Example 4
Input: @ints = (3, 4, 1, 4, 3, 1)
Output: true
Last date to submit the solution 23:59 (UK Time) Sunday 24th November 2024.