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

Redundant condition #140

Open
FlyingHii opened this issue Aug 15, 2024 · 1 comment
Open

Redundant condition #140

FlyingHii opened this issue Aug 15, 2024 · 1 comment

Comments

@FlyingHii
Copy link

https://github.com/spring1843/go-dsa/blob/main/array/reverse_inplace.go

i <= start+end/2 && i < end-i+start

The 2nd condition is redundant, I think

@spring1843
Copy link
Owner

@FlyingHii thanks for opening this issue, would you like to open a PR and show the tests passing with these modifications?

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

No branches or pull requests

2 participants