pydatastructs icon indicating copy to clipboard operation
pydatastructs copied to clipboard

Add Reverse Method to Linear Data Structures

Open arvinder004 opened this issue 9 months ago • 2 comments

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 avatar Mar 21 '25 07:03 arvinder004

@czgdp1807 @TripleCamellya sir please see this pr

arvinder004 avatar Mar 21 '25 07:03 arvinder004

@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.

TripleCamellya avatar Mar 21 '25 09:03 TripleCamellya