A sorted multiset which is similar to multiset of cpp so can developers access,delete,search elements in O(log n) time which can make job easy.Helpful for coders.
Project description
Example Package
User Guide GitHub-flavored Markdown
1)A orderdmultiset is a module which has same behavior like cpp multiset.
2)it is most important for cosing community which help to grow python in coding community.
3)it has various functions like appending an element, erasing an element,searching an element, poping out an element from left and poopoing out an element from right all operations done in O(log n) times.
4)we can make a ascending multiset as well as descending multiset via providing a parameter in object reverse=True for descending.
- How to create multiset :--> For asceding multiset:-> var_name=sortedmultiset.sortedmultiset(reverse=False)#--->To create an object of ascending sorted multiset . -reverse=False is optional for ascending multiset it is bydefault parameter. For descending multiset:-> var_name=sortedmultiset.sortedmultiset(reverse=True)#--->To create an object of descending sorted multiset. -reverse=True is required while creating descending multiset. -Functions :--> var_name.append(element:int)#---> To add an element in O(log n). var_name.search(element:int)#--->To search an element in O(log n). var_name.erase(element:int)#--->To delete an element in O(log n). var_name.popleft()#--------> To delete the First/Leftmost most element in O(log n). var_name.popright()#--------> To delete the Last/Rightmost most element in O(log n).
-To access all the stored elements u can use following syntax:--> var_name.multiset---> A list where all the element are stored.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sortedmultiset-1.1.1.tar.gz.
File metadata
- Download URL: sortedmultiset-1.1.1.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0beffe9470b885ca31fe61b750efb101984583bf3e1ca113084cfb18c2942b13
|
|
| MD5 |
e17e1592d3e745be8e0b66f954845cc8
|
|
| BLAKE2b-256 |
a527fbd49809c13856a83491be29208df7dea13ba9a717964439860ec8faa108
|
File details
Details for the file sortedmultiset-1.1.1-py3-none-any.whl.
File metadata
- Download URL: sortedmultiset-1.1.1-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
edd404bbd2fc51d71e846cdb361da75ae60441b6a6f53406e443eea36a56da64
|
|
| MD5 |
bc94797bc8dff889c45613e429314fa3
|
|
| BLAKE2b-256 |
abf0c74c4048c0a95512a2c0dfe0379e2185a3726396c02d1e8ba65fba59ce87
|