Dart
Dart copied to clipboard
Create Search_Leaders.dart
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}
.
@Parowicz Sir, I request you to please merge my pull request for Hacktober Fest 2020.
Can you add test cases and answer issues pointed by @akashgkrishnan?
@Parowicz Sir, I am a beginner, kindly help me in resolving the same. Thank you
@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
HI @RimjhimGupta
Would you like to complete this PR?