neerajnanvani / PracticeGitAndJs

Its an practice repo to create pull request and use more github features
0 stars 10 forks source link

Leaders in an array #40

Open SatyabratDeveloper opened 1 year ago

SatyabratDeveloper commented 1 year ago

Given an array A of positive integers. Your task is to find the leaders in the array. An element of array is leader if it is greater than or equal to all the elements to its right side. The rightmost element is always a leader.