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

Open neetu1123 opened 1 year ago

neetu1123 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.