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

Two Pointers Algorithm added in PHP/Searches/TwoPointers.php #152

Merged
merged 9 commits into from
Jun 14, 2024

Conversation

arafinmridul
Copy link
Contributor

Definition, Usage and Step by step Two Pointers technique implementation in PHP with example problem. Explained in every step with proper comments.

Two Pointers technique implementation written in PHP
Searches/TwoPointers.php Outdated Show resolved Hide resolved
Copy link
Contributor

@darwinz darwinz left a comment

Choose a reason for hiding this comment

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

Add unit test, and add to Directory.md

@arafinmridul
Copy link
Contributor Author

For the ./Searches/TwoPointers.php file, Added file path in Directory.md. Added unit test cases.

@darwinz
Copy link
Contributor

darwinz commented Jun 5, 2024

Looking much better. Thank you for adding the file path in Directory.md, and adding a proper unit test. The linter is complaining about one issue. Fix this issue, and we should be able to merge.

FILE: /home/runner/work/PHP/PHP/Searches/TwoPointers.php
------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------
 1 | ERROR | [x] Header blocks must be separated by a single blank line
------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------

@darwinz
Copy link
Contributor

darwinz commented Jun 12, 2024

Thanks for updating, @arafinmridul . Looks like you still have a linter issue. Please address this.

FILE: /home/runner/work/PHP/PHP/Searches/TwoPointers.php
------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------
 1 | ERROR | [x] Header blocks must be separated by a single blank line
------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------

If you run vendor/bin/phpcs -n locally after making a fix, you can see any errors and ensure there aren't any after each fix you do.

Searches/TwoPointers.php Outdated Show resolved Hide resolved
Copy link
Contributor

@darwinz darwinz left a comment

Choose a reason for hiding this comment

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

Thank you!

@darwinz darwinz merged commit 500b1bc into TheAlgorithms:master Jun 14, 2024
2 checks passed
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.

2 participants