Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: constant inputs in LongestIncreasingSubsequence::findLISLen #5160

Merged

Conversation

vil02
Copy link
Member

@vil02 vil02 commented May 12, 2024

This PR adds missing tests, fixes LongestIncreasingSubsequence::findLISLen to handle constant and empty inputs and removes the main method from LongestIncreasingSubsequence.

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized it.
  • All filenames are in PascalCase.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • All new code is formatted with clang-format -i --style=file path/to/your/file.java

@codecov-commenter
Copy link

codecov-commenter commented May 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 38.57%. Comparing base (0f42e99) to head (ec10f94).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5160      +/-   ##
============================================
+ Coverage     38.27%   38.57%   +0.30%     
- Complexity     2362     2377      +15     
============================================
  Files           516      516              
  Lines         15322    15315       -7     
  Branches       2957     2957              
============================================
+ Hits           5864     5908      +44     
+ Misses         9173     9121      -52     
- Partials        285      286       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vil02 vil02 marked this pull request as ready for review May 12, 2024 13:24
@vil02 vil02 enabled auto-merge (squash) May 12, 2024 13:24
@vil02 vil02 changed the title fix: handle constant inputs in `LongestIncreasingSubsequence::findLISLen' fix: handle constant inputs in LongestIncreasingSubsequence::findLISLen May 12, 2024
@vil02 vil02 changed the title fix: handle constant inputs in LongestIncreasingSubsequence::findLISLen fix: constant inputs in LongestIncreasingSubsequence::findLISLen May 12, 2024
@vil02 vil02 force-pushed the add_LongestIncreasingSubsequenceTests branch from 886383d to ec10f94 Compare May 16, 2024 20:28
@vil02 vil02 merged commit bf9d0ed into TheAlgorithms:master May 17, 2024
5 checks passed
@vil02 vil02 deleted the add_LongestIncreasingSubsequenceTests branch May 17, 2024 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants