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: Third Maximum
10. TASK #2: Jumbled Letters
HEADLINES
Welcome to the Week #289
of The Weekly Challenge
.
Let us all welcome one more Perl
hacker, Andre Ploger
to Team PWC
and thanks for the first contributions in Perl and Go. Even we had blog post too.
Thank you, Conor Hoekstra
, for sharing solution in Python for the first time.
Paulo Custodio
is on mission to get all the past challenges in Python
. Please keep it coming.
Thanks, Dave Jacoby
for the blog post after a long gap.
Hacktoberfest
annual festival is back once again. I am planning to join the GitHub
repositories: The Weekly Challenge and Perl Weekly Challenge Club like last year and allow all contributors to participate in the event..
Good Luck
everyone and keep sharing.
Last 5 weeks
mainstream contribution stats. Thank you Team PWC
for your support and encouragements.
Week |
Perl |
Raku |
Blog |
284 |
68 | 23 | 17 |
285 |
61 | 23 | 18 |
286 |
59 | 25 | 20 |
287 |
52 | 25 | 28 |
288 |
42 | 18 | 17 |
Last 5 weeks
guest contribution stats. Thank you each and every guest contributors for your time and efforts.
Week |
Guests |
Contributions |
Languages |
284 |
20 | 74 | 24 |
285 |
17 | 72 | 25 |
286 |
14 | 50 | 21 |
287 |
14 | 63 | 19 |
288 |
10 | 46 | 16 |
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 (2920)
2. Rust (756)
3. Ruby (730)
4. Haskell (709)
5. Lua (643)
6. C (585)
7. C++ (549)
8. JavaScript (491)
9. Go (412)
10. BQN (374)
Blogs with Creative Title
1. Diving Deep: Recursive Solutions for Palindromes and Contiguous Blocks by Andre Ploger.
2. Contiguously Closest by Arne Sommer.
3. Return of the Son of This Looks Like A Job For Recursion! by Dave Jacoby.
4. Contiguous Palindromes by Jorg Sommrey.
5. not complete! by Luca Ferrari.
6. The Simple and the Fast by Matthias Muth.
7. A Man, A Plan, A Canal… PANAMA! by Packy Anderson.
8. Nearness and contiguity by Peter Campbell Smith.
9. Block the Palindrome by Roger Bell_West.
GitHub Repository Stats
1. Commits: 40,464 (+106
)
2. Pull Requests: 10,909 (+29
)
3. Contributors: 254 (+1
)
4. Fork: 320
5. Stars: 175
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 - 288 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
Andre Ploger, an expert Perl
hacker joined Team PWC
.
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 #288.
Please find past solutions by respected guests. Please share your creative solutions in other languages.
Task 1: Third Maximum
Submitted by: Mohammad Sajid Anwar
You are given an array of integers, @ints
.
Write a script to find the third distinct maximum in the given array. If third maximum doesn’t exist then return the maximum number.
Example 1
Input: @ints = (5, 6, 4, 1)
Output: 4
The first distinct maximum is 6.
The second distinct maximum is 5.
The third distinct maximum is 4.
Example 2
Input: @ints = (4, 5)
Output: 5
In the given array, the third maximum doesn't exist therefore returns the maximum.
Example 3
Input: @ints = (1, 2, 2, 3)
Output: 1
The first distinct maximum is 3.
The second distinct maximum is 2.
The third distinct maximum is 1.
Task 2: Jumbled Letters
Submitted by: Ryan Thompson
An Internet legend dating back to at least 2001 goes something like this:
Aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it deosn’t mttaer in waht oredr the ltteers in a wrod are, the olny iprmoetnt tihng is taht the frist and lsat ltteer be at the rghit pclae. The rset can be a toatl mses and you can sitll raed it wouthit porbelm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe.
This supposed Cambridge research is unfortunately an urban legend. However, the effect has been studied. For example—and with a title that probably made the journal’s editor a little nervous—Raeding wrods with jubmled lettres: there is a cost by Rayner, White, et. al. looked at reading speed and comprehension of jumbled text.
Your task is to write a program that takes English text as its input and outputs a jumbled version as follows:
- The first and last letter of every word must stay the same
- The remaining letters in the word are scrambled in a random order (if that happens to be the original order, that is OK).
- Whitespace, punctuation, and capitalization must stay the same
- The order of words does not change, only the letters inside the word
So, for example, “Perl” could become “Prel”, or stay as “Perl,” but it could not become “Pelr” or “lreP”.
I don’t know if this effect has been studied in other languages besides English, but please consider sharing your results if you try!
Last date to submit the solution 23:59 (UK Time) Sunday 6th October 2024.