The Weekly Challenge - 095

Monday, Jan 11, 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: Palindrome Number

10. TASK #2: Demo Stack


HEADLINES


Last week, we declared Niels van Dijke the last Champion of the year 2020. We are proud to present the interview with him. As always happens, you get to know a lot about the champion. This time around, I was pleasantly surprised to know a lot about Niels. Not many of you know that Neils donated the prize money back to me. I am humbled by his gesture. Thank you, Neils. However, I strongly discourage this tradition. This is going to be the first and last time, I accept the offer. I would rather be more happy if future champion accept the small token of gift as THANK YOU from all us. You deserve it all.

Running the weekly challenge is my passion. Every time, I receive even a simpe thank you message, it gives me energy to keep it going. Honestly speaking, I never dreamt of reaching to fellow hacker across the globe. This has given me the platform to interact with the best brain and learn from them. I believe the knowledge base we have collected here is priceless. Members like Stuart Little and Paulo Custodio keep me on my toes all the time by not just dealing with current week task but also grabbing past challenges. I salute their efforts. Keep inspiring us always.

Contributions Summary

This week, we had 35 contributions by guests in 14 different languages. I would like to THANK each and every guest contributors.

Languages Summary


While we are talking about contributions, lets share some interesting stats from the GitHub repository.

1) Commits: 13,062 (+217)

2) Pull Requests: 3,213 (+72)

3) Contributors: 156

4) Fork: 197 (+3)

5) Stars: 88 (+1)


Last but not the 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 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 - 094” by Mohammad S Anwar.


PERL REVIEW


Please checkout Perl solutions review of the “Perl Weekly Challenge - 092” 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


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 solution to Task #1 in Node.

02) Adam Russell shared solutions to Task #1 and Task #2 in Prolog.

03) Cheok-Yin Fung shared solution to Task #2 in Java.

04) Laurent Rosenfeld shared solutions to Task #1 and Task #2 in Scala.

05) Lubos Kolouch shared solutions to Task #1 and Task #2 in Python.

06) Mohammad Meraj Zia shared solution to Task #2 in Java.

07) Nuno Vieira shared solutions to Task #1 and Task #2 in JavaScript.

08) Paulo Custodio shared solutions to Task #1 and Task #2 in Basic.

09) Paulo Custodio shared solutions to Task #1 and Task #2 in C.

10) Paulo Custodio shared solutions to Task #1 and Task #2 in C++.

11) Paulo Custodio shared solutions to Task #1 and Task #2 in Forth.

12) Paulo Custodio shared solutions to Task #1 and Task #2 in Python.

13) Roger Bell_West shared solutions to Task #1 and Task #2 in Python.

14) Roger Bell_West shared solutions to Task #1 and Task #2 in Ruby.

15) Roger Bell_West shared solutions to Task #1 and Task #2 in Rust.

16) Stuart Little shared solutions to Task #1 and Task #2 in Haskell.

17) Tyler Wardhaugh shared solutions to Task #1 and Task #2 in Clojure.

18) Tyler Wardhaugh shared solutions to Task #1 and Task #2 in Lua.

19) Ulrich Rieke shared solution to Task #1 in C++.

20) 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 › Palindrome Number

Submitted by: Mohammad S Anwar

You are given a number $N.

Write a script to figure out if the given number is Palindrome. Print 1 if true otherwise 0.

Example 1:

Input: 1221
Output: 1

Example 2:

Input: -101
Output: 0, since -101 and 101- are not the same.

Example 3:

Input: 90
Output: 0


TASK #2 › Demo Stack

Submitted by: Mohammad S Anwar

Write a script to demonstrate Stack operations like below:

push($n) - add $n to the stack

pop() - remove the top element

top() - get the top element

min() - return the minimum element


Example:

my $stack = Stack->new;
$stack->push(2);
$stack->push(-1);
$stack->push(0);
$stack->pop;       # removes 0
print $stack->top; # prints -1
$stack->push(0);
print $stack->min; # prints -1


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


SO WHAT DO YOU THINK ?

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

Contact with me