Python icon indicating copy to clipboard operation
Python copied to clipboard

Fix: This implemention fails with the way of string construction.

Open okcd00 opened this issue 3 years ago • 1 comments

An example which fails in this implemention: "abb"

  • The answer should be "bb".
  • This implemention returns "b" only.
  • With the fix, the answer is "bb" now.

Moreover, than is a typo, should be then.

Describe your change:

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

Checklist:

  • [x] I have read CONTRIBUTING.md.
  • [x] This pull request is all my own work -- I have not plagiarized.
  • [x] I know that pull requests will not be merged if they fail the automated tests.
  • [x] This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • [x] All new Python files are placed inside an existing directory.
  • [x] All filenames are in all lowercase characters with no spaces or dashes.
  • [x] All functions and variable names follow Python naming conventions.
  • [x] All function parameters and return values are annotated with Python type hints.
  • [x] All functions have doctests that pass the automated testing.
  • [x] All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
  • [x] If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.

okcd00 avatar Jul 05 '22 18:07 okcd00

All I modified is the line from manacher.py, but the tests failed in quantum/ripple_adder_classic.py.

It might be the remaining issue of other solutions, not for this PR.

==================================== ERRORS ====================================
_______________ ERROR collecting quantum/ripple_adder_classic.py _______________
quantum/ripple_adder_classic.py:6: in <module>
    from qiskit.providers import BaseBackend
E   ImportError: cannot import name 'BaseBackend' from 'qiskit.providers' (/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/qiskit/providers/__init__.py)

okcd00 avatar Jul 11 '22 09:07 okcd00

In preparation for that denial-of-service attack that is Hacktoberfest, I am closing all pull requests that have failing tests.

cclauss avatar Oct 01 '22 10:10 cclauss