neerajnanvani / PracticeGitAndJs

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

Solved Question No 2 (find the leaders in an array) #12

Closed ravikant2707 closed 1 year ago

ravikant2707 commented 2 years ago

resolves #2 here I am comparing each number in array with the number which is right side of that number. logic( arr[i]>=arr[i+1]); for all arr[i] output- array of all leaders.