The Weekly Challenge - 301

Monday, Dec 23, 2024| Tags: Perl, Raku

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: Largest Number

10. TASK #2: Hamming Distance


HEADLINES


Welcome to the Week #301 of The Weekly Challenge.

Last week, I noticed a slight jump in contributions by Team PWC members. Well done team.

Ryan Thompson didn’t want to miss the celebration either. So here we have his contributions in Perl. Not only that we also received a blog post as bonus.

Talking about comeback, we have suprise contribution from Robert McIntosh in Python along with two blog posts, one for Task #1 and second for Task #2.

Thank you, Robert Ransbottom, for sharing solutions to Week #298.

Welcome back, Torgny Lyon, and thanks for sharing solutions to Perl.

Last but not least, thank you everyone for the best wishes and Christmas greetings. Have a fun and healthy Christmas with your loved one.


Advent Calendar 2024


Day 1: Leaping from Tree to Tree as They Float Down the Mighty Rivers of British Columbia by Dave Jacoby.

Day 2: Special Zeroes by Jorg Sommrey.

Day 3: Split the weakest by Peter Campbell Smith.

Day 4: Reverse Power by Arne Sommer.

Day 5: Odd Character / Most Frequent Word by Laurent Rosenfeld.

Day 6: Easy Pairs - Easy Merge by Matthias Muth.

Day 7: Smaller than Echelon by Roger Bell_West.

Day 8: Count Sumofvaluacula by Adam Russell.

Day 9: Target Index / Merge Items by James Smith.

Day 10: Unique Occurrences / Dictionary Rank by Robbie Hatley.

Day 11: Element Digit Sum / Dictionary Rank by Simon Green.

Day 12: Max Positive Negative / Count Equal Divisible by Ali Moradi.

Day 13: Don’t Sort It, Be Happy by Bob Lied.

Day 14: Greatest English Letter / Target Array by W. Luis Mochan.

Day 15: TDD for Good… strings by Lance Wicks.

Day 16: Complete Day / Maximum Frequency by Ryan Thompson.

Day 17: Strong Password by E. Choroba.

Day 18: Where is the chess piece going to? by Cheok-Yin Fung.

Day 19: Lost Connections and Making Changes by David Ferrone.

Day 20: Occurrences with BQN by BarrOff.

Day 21: Strength Uncombined by Bruce Gray.

Day 22: Spammer Game by Packy Anderson.

Day 23: Maximal Square / Right Interval by Luca Ferrari.



Last 5 weeks mainstream contribution stats. Thank you Team PWC for your support and encouragements.

  Week      Perl       Raku       Blog   
   296       49       19       16   
   297       44       20       23   
   298       35       18       21   
   299       35       11       10   
   300       39       17       16   

Last 5 weeks guest contribution stats. Thank you each and every guest contributors for your time and efforts.

  Week      Guests       Contributions       Languages   
   296       11       49       17   
   297       13       53       18   
   298       9       45       19   
   299       10       45       19   
   300       10       42       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     (3113)
 2. Rust       (816)
 3. Ruby       (755)
 4. Haskell    (731)
 5. Lua        (672)
 6. C          (589)
 7. C++        (573)
 8. JavaScript (518)
 9. Go         (442)
10. BQN        (400)

Blogs with Creative Title


1. Beautifully Nested by Arne Sommer.

2. Like Tricentennial but for Weeks by Dave Jacoby.

3. The Beautiful, The Cute and The Nested by Jorg Sommrey.

4. only Raku before Christmas! by Luca Ferrari.

5. Beauty and the nest by Peter Campbell Smith.

6. What a Beautiful Nest by Roger Bell_West.

7. You there, Perl, may you live forever! by Ryan Thompson.

8. Nested beauty by Simon Green.


GitHub Repository Stats


1. Commits: 41,651 (+95)

2. Pull Requests: 11,326 (+33)

3. Contributors: 254

4. Fork: 321

5. Stars: 179 (+1)



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 - 300 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 #300.

Please find past solutions by respected guests. Please share your creative solutions in other languages.


Task 1: Largest Number

Submitted by: Mohammad Sajid Anwar

You are given a list of positive integers, @ints.

Write a script to arrange all the elements in the given list such that they form the largest number and return it.

Example 1

Input: @ints = (20, 3)
Output: 320

Example 2

Input: @ints = (3, 30, 34, 5, 9)
Output: 9534330

Task 2: Hamming Distance

Submitted by: Mohammad Sajid Anwar

You are given an array of integers, @ints.

Write a script to return the sum of Hamming distances between all the pairs of the integers in the given array of integers.


The Hamming distance between two integers is the number of places in which their binary representations differ.

Example 1

Input: @ints = (4, 14, 2)
Output: 6

Binary representation:
4  => 0100
14 => 1110
2  => 0010

HammingDistance(4, 14) + HammingDistance(4, 2) + HammingDistance(14, 2) = 2 + 2 + 2 = 6.

Example 2

Input: @ints = (4, 14, 4)
Output: 4


Last date to submit the solution 23:59 (UK Time) Sunday 29th December 2024.


SO WHAT DO YOU THINK ?

If you have any suggestions or ideas then please do share with us.

Contact with me