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

added new funtions #495

Merged
merged 1 commit into from
Feb 25, 2025
Merged

Conversation

that-ar-guy
Copy link
Contributor

fixes: #494

This pull request includes several enhancements and refactoring of the ListManipulator class in the pysnippets/list/list_manipulation.py file, as well as updates to the corresponding test cases. The main changes involve adding new utility methods for list manipulation and removing redundant docstrings.

Enhancements and new utility methods:

  • Added chunk_list method to split a list into smaller chunks of a given size.

  • Added most_frequent_element method to identify the most frequently occurring element in a list.

  • Added rotate_list method to rotate the list by a given number of positions.

  • Added unique_elements method to get elements that appear exactly once in the list.

  • Added find_pairs_with_sum method to find all pairs of numbers that sum to a specific target.

  • Added test cases for the new methods chunk_list, most_frequent_element, rotate_list, unique_elements, and find_pairs_with_sum in pysnippets/list/test_list_manipulation.py.

  • All test cases have been executed successfully, confirming the correctness of the changes.

Copy link
Contributor

👋 Thank you for opening this pull request! We're excited to review your contribution. Please give us a moment, and we'll get back to you shortly!

Feel free to join our community on Discord to discuss more!

@that-ar-guy
Copy link
Contributor Author

"Hi @UTSAVS26 / @pavitraag , I've created a PR and have been waiting for your review—please let me know if any changes are needed. Thanks!"

@UTSAVS26 UTSAVS26 merged commit 8697b61 into UTSAVS26:main Feb 25, 2025
1 check passed
@that-ar-guy
Copy link
Contributor Author

that-ar-guy commented Feb 25, 2025

@UTSAVS26 Please update my points at your earliest convenience

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Enhance listmanipulation.py with Additional List Operations
2 participants