The Weekly Challenge - 127

Monday, Aug 23, 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: Disjoint Sets

10. TASK #2: Conflict Intervals


HEADLINES


Congratulation Team PWC for reaching the 100+ contributions once again. We had 45 guest contributions too. Not a bad effort considering it is still holiday period for many members.

Did you have notice, the github repository Perl Weekly Challenge Club now have 100 stars and 220 forks. I must inform you that we have been given stars by non participants as well. It shows how popular is our club.

We now have the interview with our recent champion Flavio Poletti LIVE now. Please take a look and find out more about him and his journey so far.

Let us welcome, Konstantinos Giannakakis. an experienced Perl hacker to Team PWC. I hope and wish him enjoyable journey with us.

Welcome back Andrew Shitov and thanks for promoting The Weekly Challenge contributions in the recently concluded Raku Conference. Also thanks for contribution to Task #1 in Raku.

Welcome back Andinus after a short break. Thanks for your solutions in Raku to Task #1 and Task #2. Not only that, you even shared blog with us. Thank you.

Welcome back Richard Park after a short break. It is always pleasure to see you in action. In over 75+ guest languages, Python still leading with nearly 500 solutions. However, for me, APL is very special as it is unique language where mostly symbols are used as showed by him in solutions to Task #1 and Task #2.

Have you seen Richard's live video coding in APL?

It is magical. Let me dig out one for you, just in case you want to see.




Welcome back, Belmark Caday after the break and thanks for sharing your contributions.

We had another re-entry of champion, Tyler Wardhaugh with his contributions in Clojure as in Task #1 and Task #2.

Last but not the least, Duane Powell made a comeback after a short break with his contributions.


Blogs with Creative Title


1. Count Minesweeper by Arne Sommer.

2. I Sweep For No One by Colin Crain.

3. That One Is Mine by Dave Jacoby.

4. Counting Mines by Luca Ferarri.

5. Count Sweeper by Roger Bell_West.


Let us share some interesting stats from the GitHub repository.

1. Commits: 19,438 (+205)

2. Pull Requests: 4,764 (+51)

3. Contributors: 174 (+1)

4. Fork: 220 (+1)

5. Stars: 100 (+2)


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


PERL REVIEW


Please check out Perl solutions review of the “The Weekly Challenge - 124” 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


We have one more Perl hacker, Konstantinos Giannakakis joining 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 checkout the guest contributions for the Week #126.

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


TASK #1 › Disjoint Sets

Submitted by: Mohammad S Anwar

You are given two sets with unique integers.

Write a script to figure out if they are disjoint.

The two sets are disjoint if they don’t have any common members.

Example

Input: @S1 = (1, 2, 5, 3, 4)
       @S2 = (4, 6, 7, 8, 9)
Output: 0 as the given two sets have common member 4.

Input: @S1 = (1, 3, 5, 7, 9)
       @S2 = (0, 2, 4, 6, 8)
Output: 1 as the given two sets do not have common member.

TASK #2 › Conflict Intervals

Submitted by: Mohammad S Anwar

You are given a list of intervals.

Write a script to find out if the current interval conflicts with any of the previous intervals.

Example

Input: @Intervals = [ (1,4), (3,5), (6,8), (12, 13), (3,20) ]
Output: [ (3,5), (3,20) ]

    - The 1st interval (1,4) do not have any previous intervals to compare with, so skip it.
    - The 2nd interval (3,5) does conflict with previous interval (1,4).
    - The 3rd interval (6,8) do not conflicts with any of the previous intervals (1,4) and (3,5), so skip it.
    - The 4th interval (12,13) again do not conflicts with any of the previous intervals (1,4), (3,5) and (6,8), so skip it.
    - The 5th interval (3,20) conflicts with the first interval (1,4).

Input: @Intervals = [ (3,4), (5,7), (6,9), (10, 12), (13,15) ]
Output: [ (6,9) ]

    - The 1st interval (3,4) do not have any previous intervals to compare with, so skip it.
    - The 2nd interval (5,7) do not conflicts with the previous interval (3,4), so skip it.
    - The 3rd interval (6,9) does conflict with one of the previous intervals (5,7).
    - The 4th interval (10,12) do not conflicts with any of the previous intervals (3,4), (5,7) and (6,9), so skip it.
    - The 5th interval (13,15) do not conflicts with any of the previous intervals (3,4), (5,7), (6,9) and (10,12), so skip it.


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


SO WHAT DO YOU THINK ?

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

Contact with me