## The Weekly Challenge - 087

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

### 9. TASK #2: Largest Rectangle

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.

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

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

#### 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

#### 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

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

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

## TASK #1 › Longest Consecutive Sequence

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

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.