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: Count Smaller
10. TASK #2: Group Hero
HEADLINES
Welcome to the Week #244
of The Weekly Challenge
.
Just a gentle reminder that we would be preparing Advent Calendar 2023
very soon. If you want any of your past blog to be part of this year Advent Calendar
then please do share your blog post link to perlweeklychallenge@yahoo.com
. For your reference, please checkout last year Advent Calendar.
Last 5 weeks
mainstream contribution stats. Thank you Team PWC
for your support and encouragements.
Week |
Perl |
Raku |
Blog |
239 |
59 | 41 | 28 |
240 |
62 | 36 | 26 |
241 |
59 | 31 | 25 |
242 |
57 | 37 | 32 |
243 |
63 | 34 | 28 |
Last 5 weeks
guest contribution stats. Thank you each and every guest contributors for your time and efforts.
Week |
Guests |
Contributions |
Languages |
239 |
20 | 84 | 24 |
240 |
18 | 89 | 26 |
241 |
14 | 68 | 21 |
242 |
13 | 57 | 20 |
243 |
18 | 85 | 24 |
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 (1983)
2. Ruby (623)
3. Haskell (608)
4. Lua (548)
5. Rust (465)
6. C (461)
7. C++ (441)
8. BQN (315)
9. Go (299)
10. JavaScript (291)
Blogs with Creative Title
1. Reverse Pairs on the Floor by Adam Russell.
2. Reverse Floor by Arne Sommer.
3. Sweeping the floor by Bob Lied.
4. Walking The Floor Over You by Dave Jacoby.
5. loop-de-loop by Ian Rifkin.
6. Count the Pairs on the Floor by Jorg Sommrey.
7. map and grep to the rescue! by Luca Ferrari.
8. ComPAIRisons, optimized by Matthias Muth.
9. Three of a Reverse Sum Pair by Packy Anderson.
10. airs on the floor by Peter Campbell Smith.
11. Pairs on the Floor by Roger Bell_West.
GitHub Repository Stats
1. Commits: 35,107 (+115
)
2. Pull Requests: 9,037 (+43
)
3. Contributors: 238
4. Fork: 301 (+1
)
5. Stars: 163
SPONSOR
Our solo sponsor Pete Sergeant
has been a great support to keep us motivated. We are lucky that he agreed to continue the journey with us in the year 2023. I would like to personally thank Pete and his entire team for their generosity. It would be great if we could add few more to sponsor the prize money so that we could go back and declare weekly champions as we have done in the past. I hope and wish this will become possible in 2023. The amount doesn’t have to be huge. However, it would be nice to show off bunch of supporters. If an organisation comes forward and supports us then that would be the ultimate achievement.
RECAP
Quick recap of The Weekly Challenge - 243 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 #243.
Please find past solutions by respected guests. Please share your creative solutions in other languages.
Task 1: Count Smaller
Submitted by: Mohammad S Anwar
You are given an array of integers.
Write a script to calculate the number of integers smaller than the integer at each index.
Example 1
Input: @int = (8, 1, 2, 2, 3)
Output: (4, 0, 1, 1, 3)
For index = 0, count of elements less 8 is 4.
For index = 1, count of elements less 1 is 0.
For index = 2, count of elements less 2 is 1.
For index = 3, count of elements less 2 is 1.
For index = 4, count of elements less 3 is 3.
Example 2
Input: @int = (6, 5, 4, 8)
Output: (2, 1, 0, 3)
Example 3
Input: @int = (2, 2, 2)
Output: (0, 0, 0)
Task 2: Group Hero
Submitted by: Mohammad S Anwar
You are given an array of integers representing the strength.
Write a script to return the sum of the powers of all possible combinations; power is defined as the square of the largest number in a sequence, multiplied by the smallest.
Example 1
Input: @nums = (2, 1, 4)
Output: 141
Group 1: (2) => square(max(2)) * min(2) => 4 * 2 => 8
Group 2: (1) => square(max(1)) * min(1) => 1 * 1 => 1
Group 3: (4) => square(max(4)) * min(4) => 16 * 4 => 64
Group 4: (2,1) => square(max(2,1)) * min(2,1) => 4 * 1 => 4
Group 5: (2,4) => square(max(2,4)) * min(2,4) => 16 * 2 => 32
Group 6: (1,4) => square(max(1,4)) * min(1,4) => 16 * 1 => 16
Group 7: (2,1,4) => square(max(2,1,4)) * min(2,1,4) => 16 * 1 => 16
Sum: 8 + 1 + 64 + 4 + 32 + 16 + 16 => 141
Last date to submit the solution 23:59 (UK Time) Sunday 26th November 2023.