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 Queue #22

Closed
czgdp1807 opened this issue Jun 28, 2019 · 4 comments · Fixed by #85
Closed

Add Queue #22

czgdp1807 opened this issue Jun 28, 2019 · 4 comments · Fixed by #85

Comments

@czgdp1807
Copy link
Member

Description of the problem

Currently we use Queue from collections module. We want that this should be implemented in pydatastructs itself, however, without breaking the current code, i.e., the API should be similar to the one of collections module.

API:

  1. An empty queue should be constructed by using Queue().

  2. New elements should be added to the end by using .append(elem).

  3. The elements should be removed from the front using .popleft().

  4. The number of elements in the queue should be returned by len i.e, __len__ method should be over-rided in the Queue class.

Example of the problem

References/Other comments

See the code of OneDimensionalSegmentTree in pydatastructs.tree.space_partitioning.trees and BinaryTreeTraversal.breadth_first_search to know more about the API requirements.

@ghost
Copy link

ghost commented Dec 3, 2019

Can you please assign this issue to me??also I am new to python so I might take some time.

@czgdp1807 czgdp1807 added the KWoC label Dec 3, 2019
@czgdp1807
Copy link
Member Author

You can start working on this issue. Take your time for creating a PR for this.

@ghost
Copy link

ghost commented Dec 3, 2019

thanks

@ghost
Copy link

ghost commented Dec 11, 2019

For data type what are the parameters that we have to consider?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant