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

Corrected API in longest_increasing_subsequence #410

Merged
merged 2 commits into from
Oct 11, 2021
Merged

Corrected API in longest_increasing_subsequence #410

merged 2 commits into from
Oct 11, 2021

Conversation

pratikgl
Copy link
Member

Corrected API in longest_increasing_subsequence. Previous was returning a list instead of an ODA

References to other Issues or PRs or Relevant literature

Fixes #407

Brief description of what is fixed or changed

The API is expected to return an OneDimensionalArray (ODA). However, the previous API was returning a list instead of an ODA. I've fixed this issue.

Other comments

@codecov
Copy link

codecov bot commented Oct 11, 2021

Codecov Report

Merging #410 (0269036) into master (7878ee4) will increase coverage by 0.002%.
The diff coverage is 100.000%.

@@              Coverage Diff              @@
##            master      #410       +/-   ##
=============================================
+ Coverage   98.618%   98.620%   +0.002%     
=============================================
  Files           26        26               
  Lines         3401      3407        +6     
=============================================
+ Hits          3354      3360        +6     
  Misses          47        47               
Impacted Files Coverage Δ
pydatastructs/linear_data_structures/algorithms.py 99.720% <100.000%> (+0.004%) ⬆️

Impacted file tree graph

@@ -1010,16 +1010,18 @@ def longest_increasing_subsequence(array):
>>> from pydatastructs import longest_increasing_subsequence as LIS
>>> array = ODA(int, [2, 5, 3, 7, 11, 8, 10, 13, 6])
>>> longest_inc_subsequence = LIS(array)
>>> longest_inc_subsequence
>>> print(longest_inc_subsequence)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use str(longest_inc_subsequence).

@czgdp1807
Copy link
Member

Thanks.

@czgdp1807 czgdp1807 merged commit f391ab6 into codezonediitj:master Oct 11, 2021
@pratikgl pratikgl deleted the lis branch October 11, 2021 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API correction in longest_increasing_subsequence function
2 participants