Skip to content

Add missing Rust implementations for Two Pointers #95

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

Merged

Conversation

Peponks9
Copy link

@Peponks9 Peponks9 commented Aug 3, 2025

Description

This PR adds the missing Rust implementations for the Two Pointers pattern to complete the Rust implementation and match the Python3 structure.

Changes Made

  • Added largest_container_brute_force.rs - Brute force approach for container with most water problem
  • Added next_lexicographical_sequence.rs - Next lexicographical permutation algorithm
  • Added pair_sum_sorted_brute_force.rs - Brute force approach for finding pair sum in sorted array
  • Added triplet_sum_brute_force.rs - Brute force approach for finding triplets that sum to zero

Files Added

  • rust/Two Pointers/largest_container_brute_force.rs
  • rust/Two Pointers/next_lexicographical_sequence.rs
  • rust/Two Pointers/pair_sum_sorted_brute_force.rs
  • rust/Two Pointers/triplet_sum_brute_force.rs

- Add largest_container_brute_force.rs
- Add next_lexicographical_sequence.rs
- Add pair_sum_sorted_brute_force.rs
- Add triplet_sum_brute_force.rs

Completes the Rust Two Pointers implementation to match Python3 structure
Copy link
Collaborator

@Destiny-02 Destiny-02 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Please see comment.

@Peponks9
Copy link
Author

Peponks9 commented Aug 6, 2025

Hey @Destiny-02, changes made :)

Copy link
Collaborator

@Destiny-02 Destiny-02 left a comment

Choose a reason for hiding this comment

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

LGTM!

@Peponks9
Copy link
Author

is this one good to go?

@Destiny-02
Copy link
Collaborator

is this one good to go?

Sorry, forgot to merge!

@Destiny-02 Destiny-02 merged commit f4bf9f3 into ByteByteGoHq:main Aug 13, 2025
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