Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/takumatt/concurrentskiplist
A swift implementation of concurrent (thread-safe) skip list.
https://github.com/takumatt/concurrentskiplist
data-structures skiplist swift
Last synced: about 2 months ago
JSON representation
A swift implementation of concurrent (thread-safe) skip list.
- Host: GitHub
- URL: https://github.com/takumatt/concurrentskiplist
- Owner: takumatt
- License: mit
- Created: 2020-10-26T15:10:19.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-01-13T12:22:09.000Z (almost 4 years ago)
- Last Synced: 2023-03-03T15:15:56.180Z (almost 2 years ago)
- Topics: data-structures, skiplist, swift
- Language: Swift
- Homepage:
- Size: 11.7 KB
- Stars: 17
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Introduction
A swift implementation of concurrent (thread-safe) skip list.
This package is mostly based on [sean-public/fast-skiplist](https://github.com/sean-public/fast-skiplist).## What is Skip List?
To simply put, skip list is a data structure to represent an ordered set.
This package provides API similar to swift's `Set`.
It is a probabilistic data structure and the average complexity of `search`, `insert` and `delete` are O(logn) respectively, while O(n) in worst cases.| | Average | Worst case |
| - | - | - |
| Search | O(logn) | O(n) |
| Insert | O(logn) | O(n) |
| Delete | O(logn) | O(n) |# Installation
## Swift Package Manager
Add the following to `Package.swift`.
```
dependencies: [
.package(url: "https://github.com/takumatt/ConcurrentSkipList.git", from: "1.0.0"),
]
```