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: Split Strings
10. TASK #2: Weakest Row
HEADLINES
Welcome to the Week #253
of The Weekly Challenge
.
E. Choroba
usually shares solutions in Perl
but last week he shared solutions in C++ as well.
Joao Felipe
shared solutions in Uiua.
While I am talking about guest contributions, there is one contributor, Eric Cheung
, who regularly contributes solutions in Python on day one itself.
It feels nice to see so many Perl
and Raku
experts trying other programming languages too. I still remember it all started with Python
and now we have solutions in 100+
different programming languages.
Last 5 weeks
mainstream contribution stats. Thank you Team PWC
for your support and encouragements.
Week |
Perl |
Raku |
Blog |
248 |
50 | 29 | 24 |
249 |
51 | 24 | 23 |
250 |
56 | 34 | 27 |
251 |
51 | 33 | 23 |
252 |
54 | 35 | 23 |
Last 5 weeks
guest contribution stats. Thank you each and every guest contributors for your time and efforts.
Week |
Guests |
Contributions |
Languages |
248 |
10 | 41 | 13 |
249 |
12 | 46 | 14 |
250 |
16 | 82 | 23 |
251 |
16 | 53 | 16 |
252 |
19 | 72 | 22 |
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 (2140)
2. Ruby (644)
3. Haskell (625)
4. Lua (570)
5. Rust (504)
6. C (473)
7. C++ (468)
8. Go (319)
9. BQN (315)
10. JavaScript (311)
Blogs with Creative Title
1. Uniquely Special by Arne Sommer.
2. Special Zeroes by Jorg Sommrey.
3. doing math to get zero! by Luca Ferrari.
4. Sum Enchanted Evening by Packy Anderson.
5. Special and unique numbers by Peter Campbell Smith.
6. Unique and Special by Roger Bell_West.
7. Special zeros by Simon Green.
GitHub Repository Stats
1. Commits: 36,213 (+118
)
2. Pull Requests: 9,426 (+39
)
3. Contributors: 241
4. Fork: 304
5. Stars: 166
SPONSOR
In the year 2024
, we are looking for new sponsor for monthly 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 - 252 by Mohammad S 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 #252.
Please find past solutions by respected guests. Please share your creative solutions in other languages.
Task 1: Split Strings
Submitted by: Mohammad S Anwar
You are given an array of strings and a character separator.
Write a script to return all words separated by the given character excluding empty string.
Example 1
Input: @words = ("one.two.three","four.five","six")
$separator = "."
Output: "one","two","three","four","five","six"
Example 2
Input: @words = ("$perl$$", "$$raku$")
$separator = "$"
Output: "perl","raku"
Task 2: Weakest Row
Submitted by: Mohammad S Anwar
You are given an m x n
binary matrix i.e. only 0
and 1
where 1
always appear before 0
.
A row i
is weaker than a row j
if one of the following is true:
a) The number of 1s in row i is less than the number of 1s in row j.
b) Both rows have the same number of 1 and i < j.
Write a script to return the order of rows from weakest to strongest.
Example 1
Input: $matrix = [
[1, 1, 0, 0, 0],
[1, 1, 1, 1, 0],
[1, 0, 0, 0, 0],
[1, 1, 0, 0, 0],
[1, 1, 1, 1, 1]
]
Output: (2, 0, 3, 1, 4)
The number of 1s in each row is:
- Row 0: 2
- Row 1: 4
- Row 2: 1
- Row 3: 2
- Row 4: 5
Example 2
Input: $matrix = [
[1, 0, 0, 0],
[1, 1, 1, 1],
[1, 0, 0, 0],
[1, 0, 0, 0]
]
Output: (0, 2, 3, 1)
The number of 1s in each row is:
- Row 0: 1
- Row 1: 4
- Row 2: 1
- Row 3: 1
Last date to submit the solution 23:59 (UK Time) Sunday 28th January 2024.