-
Notifications
You must be signed in to change notification settings - Fork 313
Add reverse method to linear data structures #664
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
Comments
@arvinder004 Are you currently working on this problem to set the reverse mechanism? |
yes I have made a PR in which i have added the reverse array method...waiting for review...after that I will push for linked lists, stack and queue as well |
Can't you push it without review?
…On Tue, 25 Mar 2025, 6:26 pm Arvinder Singh Dhoul, ***@***.***> wrote:
yes I have made a PR in which i have added the reverse array
method...waiting for review...after that I will push for linked lists,
stack and queue as well
—
Reply to this email directly, view it on GitHub
<#664 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BK4IELDBWWBZICQLVILUAJ32WFHA5AVCNFSM6AAAAABZN74B2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONJRGE3TEMRSGM>
.
You are receiving this because you commented.Message ID:
***@***.***>
[image: arvinder004]*arvinder004* left a comment
(codezonediitj/pydatastructs#664)
<#664 (comment)>
yes I have made a PR in which i have added the reverse array
method...waiting for review...after that I will push for linked lists,
stack and queue as well
—
Reply to this email directly, view it on GitHub
<#664 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BK4IELDBWWBZICQLVILUAJ32WFHA5AVCNFSM6AAAAABZN74B2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONJRGE3TEMRSGM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description of the problem
I propose adding a
reverse
method to linear data structures in thepydatastructs
library, such asArray
,LinkedList
,Stack
, andQueue
. This method would reverse the order of elements in the data structure, enhancing the library's functionality for sequence manipulation. The addition of this method would provide a convenient and intuitive way for users to invert sequences, which is a common operation in algorithmic problem-solving and data processing tasks.The implementation should:
Array
andLinkedList
) to optimize space complexity.Proposed scope:
Array
: Swap elements from start to end.LinkedList
: Reverse the direction of pointers.Stack
: Pop and push elements in reverse order (possibly returning a new stack).Queue
: Reverse the order of elements (possibly returning a new queue).Example of the problem
The text was updated successfully, but these errors were encountered: