The Weekly Challenge - 087

Monday, Nov 9, 2020| Tags: Perl, Raku

TABLE OF CONTENTS


1. HEADLINES

2. RECAP

3. PERL REVIEW

4. RAKU REVIEW

5. CHART

6. NEW MEMBERS

7. GUESTS

8. TASK #1: Longest Consecutive Sequence

9. TASK #2: Largest Rectangle


HEADLINES


Welcome Daniel Bowling and Tejas to the Team PWC.

I am happy to see so many different solutions to the Sudoku task. I have never played the game before. With so many different solutions with great blog, it would be a good late night reading. I will try one day myself. Thanks to Team PWC for all the hard work.

Contributions Summary

This week, we had 23 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: 11,369 (+223)

2) Pull Requests: 2,773 (+45)

3) Contributors: 143 (+1)

4) Fork: 180 (+3)

5) Stars: 83 (+1)


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

RECAP


Quick recap of the “The Weekly Challenge - 086” by Mohammad S Anwar.


PERL REVIEW


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


Daniel Bowling from Reston, VA.

Tejas from Bangalore, India.

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


1) Abigail shared solution to Task #1 in C.

2) Abigail shared solution to Task #1 in Node.

3) Abigail shared solution to Task #1 in SQL.

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

5) E. Choroba shared solution to Task #2 in C.

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

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

8) Richard Park shared solutions to Task #1 and Task #2 in APL.

9) Roger Bell_West shared solution to Task #1 in Python.

10) Roger Bell_West shared solution to Task #1 in Ruby.

11) Roger Bell_West shared solution to Task #1 in Rust.

12) Shawn Wagner shared solution to Task #1 in Tcl.

13) Tejas shared solutions to Task #1 and Task #2 in C++.

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

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

16) 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 › Longest Consecutive Sequence

Submitted by: Mohammad S Anwar

You are given an unsorted array of integers @N.

Write a script to find the longest consecutive sequence. Print 0 if none sequence found.

Example 1:

Input: @N = (100, 4, 50, 3, 2)
Output: (2, 3, 4)

Example 2:

Input: @N = (20, 30, 10, 40, 50)
Output: 0

Example 3:

Input: @N = (20, 19, 9, 11, 10)
Output: (9, 10, 11)


TASK #2 › Largest Rectangle

Submitted by: Mohammad S Anwar

You are given matrix m x n with 0 and 1.

Write a script to find the largest rectangle containing only 1. Print 0 if none found.

Example 1:

Input:
    [ 0 0 0 1 0 0 ]
    [ 1 1 1 0 0 0 ]
    [ 0 0 1 0 0 1 ]
    [ 1 1 1 1 1 0 ]
    [ 1 1 1 1 1 0 ]

Output:
    [ 1 1 1 1 1 ]
    [ 1 1 1 1 1 ]

Example 2:

Input:
    [ 1 0 1 0 1 0 ]
    [ 0 1 0 1 0 1 ]
    [ 1 0 1 0 1 0 ]
    [ 0 1 0 1 0 1 ]

Output: 0

Example 3:

Input:
    [ 0 0 0 1 1 1 ]
    [ 1 1 1 1 1 1 ]
    [ 0 0 1 0 0 1 ]
    [ 0 0 1 1 1 1 ]
    [ 0 0 1 1 1 1 ]

Output:
    [ 1 1 1 1 ]
    [ 1 1 1 1 ]


Last date to submit the solution 23:59 (UK Time) Sunday 22nd November 2020.


SO WHAT DO YOU THINK ?

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

Contact with me