Download the PHP package opmvpc/constructs without Composer
On this page you can find all versions of the php package opmvpc/constructs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download opmvpc/constructs
More information about opmvpc/constructs
Files in opmvpc/constructs
Download opmvpc/constructs
More information about opmvpc/constructs
Files in opmvpc/constructs
Vendor opmvpc
Package constructs
Short Description Data structures
License MIT
Homepage https://github.com/opmvpc/constructs
Package constructs
Short Description Data structures
License MIT
Homepage https://github.com/opmvpc/constructs
Keywords packagedata structures
Please rate this library. Is it a good library?
Informations about the package constructs
Constructs
Constructs provides simple data structures with a fluent api.
- Install
- Lists
- ArrayList
- LinkedList
- Stacks
- ArrayStack
- LinkedStack
- Queues
- ArrayQueue
- Threes
- ArrayHeap
- SearchThree
- Helpers
- toArray()
- dump() & dumpAndDie()
🛠 Install
Just add this package to your composer project:
Then import Constructs main class or individual classes in your code.
Lists
Available methods
ArrayList
Usage
LinkedList
Usage
Complexity
Method | ArrayList | LinkedList |
---|---|---|
get() | O(1) | O(n) |
add() | O(1) | O(1) |
remove() | O(n) | O(n) |
Stacks
Available methods
ArrayStack
Usage
LinkedStack
Usage
Complexity
Method | ArrayStack | LinkedStack |
---|---|---|
isEmpty() | O(1) | O(1) |
push() | O(1) | O(1) |
pop() | O(1) | O(1) |
Queues
Available methods
ArrayQueue
Usage
Complexity
Method | ArrayQueue | LinkedQueue |
---|---|---|
isEmpty() | O(1) | O(1) |
push() | O(1) | O(1) |
pop() | O(1) | O(1) |
Threes
ArrayHeap
Available methods
Usage
Complexity
Method | ArrayHeap | LinkedHeap |
---|---|---|
get() | O(1) | O(nlog(n)) |
add() | O(nlog(n)) | O(nlog(n)) |
remove() | O(nlog(n)) | O(nlog(n)) |
LinkedSearchThree
Available methods
Usage
Algorithmic Complexity
Method | ArraySearchThree | LinkedSearchThree |
---|---|---|
search() | O(2ⁿ) | O(h) |
insert() | O(2ⁿ) | O(h) |
remove() | O(2ⁿ) | O(h) |
Space Complexity
Type | Space complexity |
---|---|
ArraySearchThree | O(2ⁿ) |
LinkedSearchThree | O(n) |
Helpers
toArray()
You can get an array representation of the current structure with the method.
dump() 🚽 & dumpAndDie() ☠
Constructs uses the var_dumper Symfony component. You can use the method on your structures.
If you are more a "Dump and die" person, method is also available.
All versions of constructs with dependencies
PHP Build Version
Package Version
The package opmvpc/constructs contains the following files
Loading the files please wait ....