Skip to content

Add Reverse Method to Linear Data Structures#665

Open
arvinder004 wants to merge 8 commits into
codezonediitj:mainfrom
arvinder004:reverse_method
Open

Add Reverse Method to Linear Data Structures#665
arvinder004 wants to merge 8 commits into
codezonediitj:mainfrom
arvinder004:reverse_method

Conversation

@arvinder004

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

@czgdp1807 @TripleCamellya sir please see this pr

@LostSnowfluff

Copy link
Copy Markdown
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