The Weekly Challenge - 145

Monday, Dec 27, 2021| 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: Dot Product

10. TASK #2: Palindromic Tree


HEADLINES



Merry Christmas to all the members of Team PWC. I wish you all the happiness in the world.

Last week for me was for the family. I spent quality time with kids. I have another week off left. I am looking forward to it. I hope and wish you also had great time with your loved ones. I would like to thank the dedicated and passionate members of Team PWC who still manage to contribute in the holiday season. I know it is not easy but you still did it. I suggest if you struggle for time for the weekly challenge then simply attempt only task one as it generally takes no time. I would like mention one name specially, Colin Crain, for being the one-man army when it comes to Perl Reviews. You have done a brilliant job. It is no longer a secret how much your work is appreciated by the Team PWC members.

With the regard to the 1000 days T-shirt campaign, I haven’t had any response from the remaining champions. I can understand they are busy with the family. I am hoping in the new year they will find time to respond to my email.

This is the last week of the year 2021, let me take this opportunity to say Good Bye on behalf of Team PWC.


Revisit The Weekly Challenge - 075 (Task #1: Coins Sum)




Advent Calendar 2021


Small improvement to the Advent Calendar, it now shows the topic and author on mouse over day image. I hope you like it.


Day 21: Product SubArray by E. Choroba.

Day 22: Word Search by Javier Luque.

Day 23: Transpose CSV File by Ryan Thompson.

Day 24: Group Anagrams by Flavio Poletti.

Day 25: Swap Odd/Even bits by Mohammad S Anwar.


Blogs with Creative Title


1. A Stocking Full of Numbers: Semiprimes and the Ulam Sequence by Adam Russell.

2. Primarily Ulam with Raku (and perl) by Arne Sommer.

3. Almost Prime and In Sequence: The Weekly Challenge #144 by Dave Jacoby

4. Perl Weekly Challenge 144: headache! by Luca Ferrari.

5. Illuminating the Ulam by Peter Campbell Smith.

6. The Weekly Challenge 144: Semiprime Ulam by Roger Bell_West.


Let us share some interesting stats from the GitHub repository.

1. Commits: 22,225 (+133)

2. Pull Requests: 5,416 (+31)

3. Contributors: 183

4. Fork: 234

5. Stars: 118


Last but not least, I would like to thank each and every member for their support and encouragement.



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 2021. 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 2021. 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 - 144” by Mohammad S Anwar.


PERL REVIEW


Please check out Perl solutions review of the “The Weekly Challenge - 140” by Colin Crain.

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 checkout the guest contributions for the Week #144.

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


TASK #1 › Dot Product

Submitted by: Mohammad S Anwar

You are given 2 arrays of same size, @a and @b.

Write a script to implement Dot Product.

Example:

@a = (1, 2, 3);
@b = (4, 5, 6);

$dot_product = (1 * 4) + (2 * 5) + (3 * 6) => 4 + 10 + 18 => 32

TASK #2 › Palindromic Tree

Submitted by: Mohammad S Anwar

You are given a string $s.

Write a script to create a Palindromic Tree for the given string.

I found this blog exaplaining Palindromic Tree in detail.

Example 1:

Input: $s = 'redivider'
Output: r redivider e edivide d divid i ivi v

Example 2:

Input: $s = 'deific'
Output: d e i ifi f c

Example 3:

Input: $s = 'rotors'
Output: r rotor o oto t s

Example 4:

Input: $s = 'challenge'
Output: c h a l ll e n g

Example 5:

Input: $s = 'champion'
Output: c h a m p i o n

Example 6:

Input: $s = 'christmas'
Output: c h r i s t m a


Last date to submit the solution 23:59 (UK Time) Sunday 2nd January 2022.


SO WHAT DO YOU THINK ?

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

Contact with me