The Weekly Challenge - 203

Monday, Feb 6, 2023| 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: Special Quadruplets

10. TASK #2: Copy Directory


HEADLINES


Welcome to the Week #203 of The Weekly Challenge.

We have a new member from Russia last week, Valerii Dundukov. Welcome on board.

Today is the first Monday of the month and time to declare our first champion of the year 2023. With great pleasure, we announce Bob Lied as our next champion. As of today, he has contributed 100 solutions in Perl.

Today, we are giving away Coupon #26 to Flavio Poletti for the book, Learning Perl Exercises by brian d foy. I will share the details with you in a separate email.

PAST WINNERS

  S. No.    Name S. No.  Name
1.  Cheok-Yin Fung 2.  W. Luis Mochan
3.  Robert DiCicco 4.  Kueppo Wesley
5.  Solathian 6.  Dario Mazzeo
7.  Peter Campbell Smith   8.  Kjetil Skotheim
9.  Neils van Dijke 10.  Laurent Rosenfeld  
11.  Duncan C. White 12.  Ali Moradi
13.  Jorg Sommrey 14.  James Smith
15.  Alexander Pankoff 16.  Simon Green
17.  Robbie Hatley 18.  Bob Lied
19.  Athanasius 20.  David Ferrone
21.  Thomas Kohler 22.  Adam Russell
23.  E. Choroba 24.  Pip Stuart
25.  Roger Bell_West 26.
27. 28.
29. 30.
31. 32.
33. 34.
35. 36.
37. 38.
39. 40.
41. 42.
43. 44.
45. 46.
47. 48.
49. 50.

Last week, we missed the target by a bit but I am confident we would get there with some late submissions. Thank you Team PWC.

UPDATE: Few days later we received some more contributions and we finally reached the magic figure. Thank you everyone once again.

  Week      Perl       Raku       Blog   
   184       57       31       17   
   185       61       35       19   
   186       58       33       20   
   187       51       34       20   
   188       63       36       16   
   189       62       35       18   
   190       55       32       23   
   191       56       38       21   
   192       59       41       23   
   193       55       31       22   
   194       58       32       19   
   195       58       29       19   
   196       51       29       20   
   197       49       31       20   
   198       54       37       23   
   199       52       32       22   
   200       55       33       23   
   201       55       29       22   
   202       50       27       24   

I would like to thank every guest contributors for making it special every week. Last week we received 34 guest contributions in 13 languages.


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  (1302)
 2. Haskell (530)
 3. Ruby    (458)
 4. Lua     (441)
 5. C       (320)
 6. C++     (316)
 7. Rust    (307)
 8. BQN     (268)
 9. Go      (240)
10. Java    (216)

Blogs with Creative Title


1. Into the Odd Wide Valley by Adam Russell.

2. Odd Valleys by Arne Sommer.

3. How Wide is My Valley? by Colin Crain.

4. Challenge Accepted by Dave Jacoby.

5. nested loops everywhere! by Luca Ferrari.

6. Three odd things in the valleys by Peter Campbell Smith.

7. Consecutive Valley by Roger Bell_West.


GitHub Repository Stats


1. Commits: 30,555 (+111)

2. Pull Requests: 7,522 (+34)

3. Contributors: 216

4. Fork: 274

5. Stars: 151



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 - 202 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


Valerii Dundukov, an experienced Perl hacker from Russia joined the 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 #202.

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


Task 1: Special Quadruplets

Submitted by: Mohammad S Anwar

You are given an array of integers.

Write a script to find out the total special quadruplets for the given array.

Special Quadruplets are such that satisfies the following 2 rules.
1) nums[a] + nums[b] + nums[c] == nums[d]
2) a < b < c < d

Example 1

Input: @nums = (1,2,3,6)
Output: 1

Since the only special quadruplets found is $nums[0] + $nums[1] + $nums[2] == $nums[3].

Example 2

Input: @nums = (1,1,1,3,5)
Output: 4

$nums[0] + $nums[1] + $nums[2] == $nums[3]
$nums[0] + $nums[1] + $nums[3] == $nums[4]
$nums[0] + $nums[2] + $nums[3] == $nums[4]
$nums[1] + $nums[2] + $nums[3] == $nums[4]

Example 3

Input: @nums = (3,3,6,4,5)
Output: 0

Task 2: Copy Directory

Submitted by: Julien Fiegehenn

You are given path to two folders, $source and $target.

Write a script that recursively copy the directory from $source to $target except any files.


Example

Input: $source = '/a/b/c' and $target = '/x/y'

Source directory structure:

├── a
│   └── b
│       └── c
│           ├── 1
│           │   └── 1.txt
│           ├── 2
│           │   └── 2.txt
│           ├── 3
│           │   └── 3.txt
│           ├── 4
│           └── 5
│               └── 5.txt

Target directory structure:

├── x
│   └── y

Expected Result:

├── x
│   └── y
|       ├── 1
│       ├── 2
│       ├── 3
│       ├── 4
│       └── 5


Last date to submit the solution 23:59 (UK Time) Sunday 12th February 2023.


SO WHAT DO YOU THINK ?

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

Contact with me