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

Add Reverse Method to Linear Data Structures #665

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

arvinder004
Copy link
Contributor

Fixes #664

This pull request introduces a reverse method to the pydatastructs library for linear data structures, starting with an implementation for the Array class in linear_data_structures/algorithms.py The addition enhances the library's sequence manipulation capabilities by providing an in-place reversal operation for arrays, addressing a common need in algorithmic problem-solving and data processing.

In the future, I will be adding similar reverse methods for other linear data structures:

  • LinkedList: Reverse the direction of pointers in-place.

  • Stack: Pop and push elements to create a reversed stack, potentially returning a new stack.

  • Queue: Reverse the order of elements, potentially returning a new queue.

@arvinder004 arvinder004 reopened this Mar 21, 2025
@arvinder004
Copy link
Contributor Author

@czgdp1807 @TripleCamellya sir please see this pr

@TripleCamellya
Copy link
Contributor

@czgdp1807 @TripleCamellya sir please see this pr

Plz wait for discussion for API and implement with czgdp1807. I'm sorry that so far I'm just someone who is learning PyDS for GSoC.

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.

Add reverse method to linear data structures
2 participants