Skip to content

changes in strings#4635

Closed
bharadwazv wants to merge 2 commits intoTheAlgorithms:masterfrom
bharadwazv:codecleanup/strings
Closed

changes in strings#4635
bharadwazv wants to merge 2 commits intoTheAlgorithms:masterfrom
bharadwazv:codecleanup/strings

Conversation

@bharadwazv
Copy link

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 Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • 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}.

@ghost ghost added awaiting reviews This PR is ready to be reviewed enhancement This PR modified some existing files labels Aug 19, 2021
@stale
Copy link

stale bot commented Sep 19, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Used to mark an issue or pull request stale. label Sep 19, 2021
return len(first_word)

previous_row = list(range(len(second_word) + 1))
previous_row = [i for i in range(len(second_word) + 1)]
Copy link
Member

Choose a reason for hiding this comment

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

any advantage of this change?


# Store the previous row
previous_row = current_row
previous_row= current_row
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
previous_row= current_row
previous_row = current_row

# for each character in new_string find corresponding palindromic string
for i in range(len(new_input_string)):
k = 1 if i > r else min(length[l + r - i] // 2, r - i + 1)
for I in range(len(new_input_string)):
Copy link
Member

Choose a reason for hiding this comment

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

why I?

@stale stale bot removed stale Used to mark an issue or pull request stale. labels Sep 22, 2021
Copy link
Member

@poyea poyea left a comment

Choose a reason for hiding this comment

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

Please review the changes and be specific on the goal of this PR. Also see this as we're having a conflict too,.

@ghost ghost added awaiting changes A maintainer has requested changes to this PR and removed awaiting reviews This PR is ready to be reviewed labels Sep 22, 2021
@cclauss cclauss closed this Oct 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting changes A maintainer has requested changes to this PR enhancement This PR modified some existing files No Response

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants