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: Reverse Words
10) TASK #2: Edit Distance
HEADLINES
Before I forget again, I would like to welcome back our friend Luca Ferrari. I still remember his note in his last blog (week #76) before the break.
On the very next monday, September 7th, I will be in hospital for a new surgery on my (last) working right eye. In particular, I will be doing a trabeculectomy, and I’m pretty sure I will not be able to see anything for a couple of weeks, may be more. I hope my brain is not going to fail in the meantime!
It was great to see him back in action (week #94) after the break.
Yes, I was away from keyboard for almost four months due to an eye surgery, trabeculectomy, that has done good results on the eye pressure (the main aim), but quite bad results on the eyesight. Therefore, I’m not really happy with that, and I’m trying to figure out how to deal with my new (downgraded) life. As a way to force my brain to stay focused on something different, I decided to start over the Perl Weekly Challenge.
I can relate to him completely as I lost vision in my right eye 17 years ago. Few years ago, the vision of my left eye blurred. As of today, I have enough vision to survive without support. The worst part is that there is no cure and it only happens to one in a million as told by world renowned eye specialist Dr. Carlos Pavesio.
Lets get back to fun topic, as we are fast approaching 100th week, do you have any idea/plan to celebrate the moment? Please do share with us.
Did you notice the rise in popularity of contributions in guest languages?
The best week so far for contributions in guest languages was week #89
when we had 65 contributions
in 36 languages
. I remember early days we used to get just handful only. I would like to mention one name, Laurent Rosenfeld, associated with us from day one. He is the first champion of the weekly challenge. He is also rank #1
in the leaders board. Recently he started contributing in Scala as well and currently rank #14
. While talking about guest language contribuions, how can I forget Stuart Little? In just few weeks, he reached rank #1
in guest leaders board and rank #12
in regular leaders board. My current rank #11
is in danger now. Who knows by next week he will be in the top 5.
Kang-min Liu
introduced new language Janet.
Cristina Heredia
shared Python solution for the first time.
Paulo Custodio
shared solutions in C, C++, Basic, Forth and Python this week. With this, he now jumped to rank #9
in guest leaders board.
Let us welcome 2 new members joining Team PWC, Mohammad Foda
and Ali Moradi
.
Mohammad Foda
introduced 2 new languages, Haxe and Nim in the very first week.
We now have 214 members
and 7 guests
. By definition, Guest is someone who shared solutions in languages other than Perl and Raku only. As soon as guest shares at least one solution either in Perl or Raku, he/she will become full member immediately.
This week, we received 44 contributions
by guests in 17 languages
.
I would like to THANK
each and every guest contributors.
<br
While we are talking about contributions, lets share some interesting stats from the GitHub repository.
1) Commits: 13,331 (+269)
2) Pull Requests: 3,303 (+90)
3) Contributors: 158 (+2)
4) Fork: 197
5) Stars: 88
Last but not the least, I would like to thank each and every member for their support and encouragement.
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 2021. I would like to personally thank Pete and his entire team for the generosity. It would be great if we could add few more to sponsor the prize money so that we can go back and declare weekly champion as we have done in the past. I hope and wish, the year 2021 would make it possible. It doesn’t have to be huge. However, it would be nice to show off bunch of supporters. If big organisation come forward and support us then that would be the ultimate achievement.
RECAP
Quick recap of the “The Weekly Challenge - 095” by Mohammad S Anwar
.
PERL REVIEW
Please checkout Perl solutions review of the “Perl Weekly Challenge - 093” by Colin Crain
.
If you missed any past reviews then please checkout the collection.
RAKU REVIEW
If you missed any past reviews then please checkout 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
1) Mohammad Foda introduced 2 new languages, Haxe and Nim.
2) Ali Moradi, an experienced Perl hacker from Karaj, Iran.
Please find out How to contribute?, if you have any doubts.
Please give it a try to an excellent tool EZPWC created by respected member Saif Ahmed
of Team PWC.
GUESTS
01) Abigail shared solutions to Task #1 and Task #2 in Awk.
02) Abigail shared solutions to Task #1 and Task #2 in C.
03) Abigail shared solutions to Task #1 and Task #2 in Node.
04) Abigail shared solutions to Task #1 and Task #2 in Python.
05) Adam Russell shared solutions to Task #1 and Task #2 in Prolog.
06) Cristina Heredia shared solution to Task #1 in Python.
07) Kang-min Liu shared solution to Task #1 in Janet.
08) Laurent Rosenfeld shared solutions to Task #1 and Task #2 in Scala.
09) Lubos Kolouch shared solutions to Task #1 and Task #2 in Python.
10) Mohammad Meraj Zia shared solutions to Task #1 and Task #2 in Java.
11) Nuno Vieira shared solutions to Task #1 and Task #2 in JavaScript.
12) Paulo Custodio shared solutions to Task #1 and Task #2 in Basic.s
13) Paulo Custodio shared solutions to Task #1 and Task #2 in C.
14) Paulo Custodio shared solutions to Task #1 and Task #2 in C++.
15) Paulo Custodio shared solutions to Task #1 and Task #2 in Forth.
16) Paulo Custodio shared solutions to Task #1 and Task #2 in Python.
17) Roger Bell_West shared solutions to Task #1 and Task #2 in Python.
18) Roger Bell_West shared solutions to Task #1 and Task #2 in Ruby.
19) Roger Bell_West shared solutions to Task #1 and Task #2 in Rust.
20) Stuart Little shared solutions to Task #1 and Task #2 in Haskell.
21) Tyler Wardhaugh shared solutions to Task #1 and Task #2 in Clojure.
22) Tyler Wardhaugh shared solutions to Task #1 and Task #2 in Lua.
23) Ulrich Rieke shared solution to Task #1 in C++.
24) Ulrich Rieke shared solution to Task #1 in Haskell.
Please find out past solutions by respected guests. Please do share your creative solutions in other languages.
TASK #1 › Reverse Words
Submitted by: Mohammad S Anwar
You are given a string $S
.
Write a script to reverse the order of words in the given string. The string may contain leading/trailing spaces. The string may have more than one space between words in the string. Print the result without leading/trailing spaces and there should be only one space between words.
Example 1:
Input: $S = "The Weekly Challenge"
Output: "Challenge Weekly The"
Example 2:
Input: $S = " Perl and Raku are part of the same family "
Output: "family same the of part are Raku and Perl"
TASK #2 › Edit Distance
Submitted by: Mohammad S Anwar
You are given two strings $S1
and $S2
.
Write a script to find out the minimum operations required to convert $S1
into $S2
. The operations can be insert
, remove
or replace
a character. Please check out Wikipedia page for more information.
Example 1:
Input: $S1 = "kitten"; $S2 = "sitting"
Output: 3
Operation 1: replace 'k' with 's'
Operation 2: replace 'e' with 'i'
Operation 3: insert 'g' at the end
Example 2:
Input: $S1 = "sunday"; $S2 = "monday"
Output: 2
Operation 1: replace 's' with 'm'
Operation 2: replace 'u' with 'o'
Last date to submit the solution 23:59 (UK Time) Sunday 24th January 2021.