Open TheAihopGG opened 4 months ago
This pull request introduces three new classes: UDeque, UQueue, and UPair, each with their respective methods for simplified operations. Comprehensive documentation and usage examples for each class are provided in new markdown files.
Files | Changes |
---|---|
examples/udeque.md ufpy/udeque.py |
Introduced UDeque class and provided comprehensive documentation and usage examples. |
examples/uqueue.md ufpy/uqueue.py |
Introduced UQueue class and provided comprehensive documentation and usage examples. |
examples/upair.md ufpy/upair.py |
Introduced UPair class and provided comprehensive documentation and usage examples. |
Because of stack, queue, pair and deque are from c++ stl, i want to move all this features in ustl
package. Can you do this?
@sourcery-ai review
closes #35
Summary by Sourcery
This pull request introduces three new utility classes:
UDeque
,UQueue
, andUPair
, each designed to simplify common operations for double-ended queues, queues, and pairs respectively. Comprehensive documentation for each class has also been added.UDeque
class to simplify working with double-ended queues, including methods for adding, removing, and accessing elements at both ends.UQueue
class to simplify working with queues, including methods for adding, removing, and accessing the head element.UPair
class to simplify working with pairs, including methods for accessing and setting the first and second elements.UDeque
inexamples/udeque.md
covering creation, element access, addition, deletion, and iteration.UQueue
inexamples/uqueue.md
covering creation, element access, addition, deletion, and iteration.UPair
inexamples/upair.md
covering creation, element access, setting values, and length calculation.