## The Weekly Challenge - 078

Monday, Sep 14, 2020| Tags: Perl, Raku

### 9. GUESTS

Last week we announced the winner of `August 2020` and today we have the interview with `Cheok-Yin Fung` available for everyone.

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

#### 7) XSLT: 1

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

#### 5) Stars: 76 (+2)

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

You are given an array `@A` containing distinct integers.

Write a script to find all leader elements in the array `@A`. Print `(0)` if none found.

An element is leader if it is greater than all the elements to its right side.

## Example 1:

``````Input: @A = (9, 10, 7, 5, 6, 1)
Output: (10, 7, 6, 1)
``````

## Example 2:

``````Input: @A = (3, 4, 5)
Output: (5)
``````

## TASK #2 › Left Rotation

You are given array `@A` containing positive numbers and `@B` containing one or more indices from the array `@A`.

Write a script to left rotate `@A` so that the number at the first index of `@B` becomes the first element in the array. Similary, left rotate `@A` again so that the number at the second index of `@B` becomes the first element in the array.

## Example 1:

``````Input:
@A = (10 20 30 40 50)
@B = (3 4)
``````

#### Explanation:

``````a) We left rotate the 3rd index element (40) in the @A to make it 0th index member in the array.
[40 50 10 20 30]

b) We left rotate the 4th index element (50) in the @A to make it 0th index member in the array.
[50 10 20 30 40]

Output:
[40 50 10 20 30]
[50 10 20 30 40]
``````

## Example 2:

``````Input:
@A = (7 4 2 6 3)
@B = (1 3 4)
``````

#### Explanation:

``````a) We left rotate the 1st index element (4) in the @A to make it 0th index member in the array.
[4 2 6 3 7]

b) We left rotate the 3rd index element (6) in the @A to make it 0th index member in the array.
[6 3 7 4 2]

c) We left rotate the 4th index element (3) in the @A to make it 0th index member in the array.
[3 7 4 2 6]

Output:
[4 2 6 3 7]
[6 3 7 4 2]
[3 7 4 2 6]
``````

## RECAP

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

## PERL REVIEW

Please checkout Perl solutions review of the “The Weekly Challenge - 076” by `Colin Crain`.

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

## RAKU REVIEW

Please checkout Raku solutions review of the “Perl Weekly Challenge - 076” by `Andrew Shitov`.

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

#### 3) Flavio Poletti

Perl Hacker from Roma, Italia. I mainly use Perl for my own interests and stuff, trying to blog about it when possible at https://github.polettix.it/ETOOBUSY/.

With the above additions, we now have `188 members` in the Team PWC.

#### Aviral Goel, Programming Languages student at Northeastern University, Boston, MA joined as guest.

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.