Perl Weekly Challenge - 050

Monday, Mar 2, 2020| Tags: Perl, Raku


HEADLINES



It is time to announce our second winner of the year 2020. With great pleasure, we announce, Saif Ahmed, as winner of February 2020. Congratulations, Saif and thanks for your contributions, specially the tool EZPWC, created to help the Team PWC.

Every time new member joins the Team PWC, I get very excited. With time, I started to feel I know him/her so well. There is one more thing that excites me, is when I see an existing member coming back after the break. Sometimes they even contribute to past challenges. Not just only code contribution but writes blog as well. You know who I am talking about.

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



RECAP



Quick recap of the “Perl Weekly Challenge - 049” by Mohammad S Anwar.



PERL REVIEW



Please checkout Perl solutions review of the “Perl Weekly Challenge - 048” by Ryan Thompson.

If you missed any past reviews then please checkout the collection.



RAKU REVIEW



Please checkout Raku solutions review of the “Perl Weekly Challenge - 048” by Ryan Thompson.

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



Jitu Keshwani, an experienced Perl hacker from India and contributed Perl solutions.

Sol DeMuth, an experienced Perl hacker from Chicago and contributed Perl solution.


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



Jonas Berlin shared solution to Task #1 in Rust.

Orestis Zekai shared solutions to Task #1 and Task #2 in Python.

User Person shared solutions to Task #1 and Task #2 in Python.

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



TASK #1



Merge Intervals


Write a script to merge the given intervals where ever possible.

[2,7], [3,9], [10,12], [15,19], [18,22]

The script should merge [2, 7] and [3, 9] together to return [2, 9].

Similarly it should also merge [15, 19] and [18, 22] together to return [15, 22].

The final result should be something like below:

[2, 9], [10, 12], [15, 22]



TASK #2

Contributed by Ryan Thompson.


Noble Integer


You are given a list, @L, of three or more random integers between 1 and 50. A Noble Integer is an integer N in @L, such that there are exactly N integers greater than N in @L. Output any Noble Integer found in @L, or an empty list if none were found.

An interesting question is whether or not there can be multiple Noble Integers in a list.

For example,

Suppose we have list of 4 integers [2, 6, 1, 3].

Here we have 2 in the above list, known as Noble Integer, since there are exactly 2 integers in the list i.e.3 and 6, which are greater than 2.

Therefore the script would print 2.



Last date to submit the solution 23:59 (UK Time) Sunday 8th March 2020.



SO WHAT DO YOU THINK ?

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

Contact with me