Dart icon indicating copy to clipboard operation
Dart copied to clipboard

Create Search_Leaders.dart

Open RimjhimGupta opened this issue 4 years ago • 5 comments

An element is leader if it is greater than all the elements to its right side. Also, the rightmost element is always a leader. This pull request is for Hacktober Fest 2020.

Welcome to Dart community

Describe your change:

  • [ ] Add an algorithm?
  • [ ] Fix a bug or typo in an existing algorithm?
  • [ ] Documentation change?

Checklist:

  • [ ] I have read CONTRIBUTING.md.
  • [ ] This pull request is all my own work -- I have not plagiarized.
  • [ ] I know that pull requests will not be merged if they fail the automated tests.
  • [ ] This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • [ ] All new Dart files are placed inside an existing directory.
  • [ ] All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
  • [ ] If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.

RimjhimGupta avatar Oct 19 '20 18:10 RimjhimGupta

@Parowicz Sir, I request you to please merge my pull request for Hacktober Fest 2020.

RimjhimGupta avatar Oct 21 '20 15:10 RimjhimGupta

Can you add test cases and answer issues pointed by @akashgkrishnan?

Parowicz avatar Oct 21 '20 15:10 Parowicz

@Parowicz Sir, I am a beginner, kindly help me in resolving the same. Thank you

RimjhimGupta avatar Oct 22 '20 17:10 RimjhimGupta

@Parowicz Sir, I am a beginner, kindly help me in resolving the same. Thank you

@RimjhimGupta can you add the test cases as suggested by @Parowicz ? I'll suggest you look into other files in the repo and find how tests are implemented in dart and also add test cases covering major cases and edge cases also, try to implement a more efficient algorithm as the time complexity seems to be high and there are more efficient approaches. Happy coding

akashgkrishnan avatar Oct 23 '20 16:10 akashgkrishnan

HI @RimjhimGupta

Would you like to complete this PR?

akashgk avatar Nov 08 '22 04:11 akashgk