The Weekly Challenge - 160

Monday, Apr 11, 2022| 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: Four Is Magic

10. TASK #2: Equilibrium Index


HEADLINES


Welcome to yet another fun week, thanks to all the dedicated members of Team PWC.

I would like to mention one name, Laurent Rosenfeld, one of the few who stayed with us from day one. He is currently ranked #1 in the leader board. He has maintained a big lead, no immediate threat to his place. As of today, he has contributed 291 Perl, 297 Raku and 219 blog. Similarly, in the guest leaders, Abigail is currently ranked #1. His place is also very secured just like Laurent Rosenfeld.

Talking about ranks, my position in the leader board is under threat because of my irregular contributions. My current rank #15 is no longer safe. There are immediate threat from Duncan C. White and Paulo Custodio. Last week, once again I missed the boat, unfortunately.

Welcome back, Simon Proctor, we missed you. Thanks for your Raku contributions.

Thank you, Paulo Custodio, for your contributions mostly Perl.

Robert DiCicco has been consistent as well with his Perl, Raku and few other guest contributions too.

I wish you all the best and good luck.


Blogs with Creative Title


1. Farey and Farey Again, but in a Mobius Way by Adam Russell.

2. Farey, Moebius and Raku by Arne Sommer.

3. Fareys Wear Boots by Colin Crain.

4. Squarefree Is Only One Side Of the Story by Colin Crain.

5. Métal Perlant by Dave Jacoby.

6. numbers and numbers by Luca Ferarri.

7. Farey and Moebius by Roger Bell_West.


GitHub Repository Stats


1. Commits: 24,398 (+139)

2. Pull Requests: 5,903 (+32)

3. Contributors: 188

4. Fork: 244

5. Stars: 125



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 2022. 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 2022. 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 - 159 by Mohammad S Anwar.


PERL REVIEW


Please check out Perl solutions review of The Weekly Challenge - 155 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 #159.

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


TASK #1 › Four Is Magic

Submitted by: Mohammad S Anwar

You are given a positive number, $n < 10.

Write a script to generate english text sequence starting with the English cardinal representation of the given number, the word ‘is’ and then the English cardinal representation of the count of characters that made up the first word, followed by a comma. Continue until you reach four.


Example 1:

Input: $n = 5
Output: Five is four, four is magic.

Example 2:

Input: $n = 7
Output: Seven is five, five is four, four is magic.

Example 3:

Input: $n = 6
Output: Six is three, three is five, five is four, four is magic.

TASK #2 › Equilibrium Index

Submitted by: Mohammad S Anwar

You are give an array of integers, @n.

Write a script to find out the Equilibrium Index of the given array, if found.

For an array A consisting n elements, index i is an equilibrium index if the sum of elements of subarray A[0…i-1] is equal to the sum of elements of subarray A[i+1…n-1].


Example 1:

Input: @n = (1, 3, 5, 7, 9)
Output: 3

Example 2:

Input: @n = (1, 2, 3, 4, 5)
Output: -1 as no Equilibrium Index found.

Example 3:

Input: @n = (2, 4, 2)
Output: 1


Last date to submit the solution 23:59 (UK Time) Sunday 17th April 2022.


SO WHAT DO YOU THINK ?

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

Contact with me