Add Reverse Method to Linear Data Structures
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.
@czgdp1807 @TripleCamellya sir please see this pr
@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.