Skip to content

Conversation

@anoubhav
Copy link
Contributor

@anoubhav anoubhav commented Sep 5, 2018

Changes made-

  1. The first 2 return statements have been changed to break statements. This ensures that the code after the first for loop is executed. Previously it would never execute the latter part.
  2. The second append statement should add elements to stack and not storage_stack. Try the test case [3,4,7,8,5,6]. The program returns True. It should return False.

(Put an X inside the [ ] to denote check mark [X].)

  • If creating a new file :

    • added links to it in the README files ?
    • included tests with it ?
    • added description (overview of algorithm, time and space compleixty, and possible edge case) in docstrings ?
  • if done some changes :

  • other

1)The first 2 return statements have been changed to break statements. This ensures that the code after the first for loop is executed. Previously it would never execute the latter part.
2)The second append statement should add elements to stack and not storage_stack. Try the test case [3,4,7,8,5,6]. The program returns True. It should return False.
@coveralls
Copy link

coveralls commented Sep 5, 2018

Pull Request Test Coverage Report for Build 741

  • 3 of 4 (75.0%) changed or added relevant lines in 2 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.06%) to 71.552%

Changes Missing Coverage Covered Lines Changed/Added Lines %
algorithms/stack/is_sorted.py 2 3 66.67%
Files with Coverage Reduction New Missed Lines %
algorithms/search/search_rotate.py 2 92.59%
Totals Coverage Status
Change from base Build 737: 0.06%
Covered Lines: 4306
Relevant Lines: 6018

💛 - Coveralls

@danghai
Copy link
Collaborator

danghai commented Sep 5, 2018

@anoubhav Thanks PR, could you add your test case in test_stack.py in tests too?

@danghai danghai merged commit e0cc8c3 into keon:master Sep 7, 2018
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.

3 participants