arriqaaq / skiplist

Fast and simple skip list in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

skiplist

A Skiplist implementation in Go

Getting Started

Installing

To start using hash, install Go and run go get:

$ go get -u github.com/arriqaaq/skiplist

This will retrieve the library.

Usage

package main

import (
	"fmt"

	"github.com/arriqaaq/skiplist"
)

func main() {

	// Set (accepts any value)
	val := "test_val"

	n := skiplist.New()
	n.Set("ec", val)
	n.Set("dc", 123)
	n.Set("ac", val)

	// Get
	node := n.Get("ec")
	fmt.Println("value: ", node.Value())

	// Delete
	n.Delete("dc")
}

Supported Commands

Supported  commands

Set
Get
Delete

About

Fast and simple skip list in Go

License:MIT License


Languages

Language:Go 100.0%