Coder Social home page Coder Social logo

datastructures's Introduction

C# implementations of some usefull data sctructures for .NET

##Priority queue Heap-based generic concurrent priority queue for .NET

Priority queue is an abstract data type which is like a regular queue or stack data structure, but where additionally each element has a "priority" associated with it. In a priority queue, an element with high priority is served before an element with low priority. If two elements have the same priority, they are served according to their order in the queue.

###Features

  • Generic
  • Thread-safe using ReaderWriterLockSlim
  • Performant
    • Take max item, Insertion, Removal - O(N log N)
  • Resizable (queue grows and shrinks depending on the number of items)

#NuGet

###Applications

##Skip list Generic concurrent skiplist for .NET

This data structure makes random choices in arranging the entries in such a way that search and update times are O(log N) on average, where N is the number of entries in the list. Interestingly, the notion of average time complexity used here does not depend on the probability distribution of the keys in the input. Instead, it depends on the use of a random-number generator in the implementation of the insertions to help decide where to place the new entry. [Detailed overview] (https://msdn.microsoft.com/en-us/library/ms379573(VS.80).aspx#datastructures20_4_topic4) of skip list and a simple implementation.

###Features

  • Generic
  • Thread-safe using ReaderWriterLockSlim
  • Performant
    • Take min or max item - O(1)
    • Insertion, Removal, Check if contains - O(log N)
    • Enumeration in order - O(N)
  • Additional operations
    • Get Floor and Clealing items - O(log N)
    • Get items in range O(log N + K) (where K is number of items in result)

###Applications

#License Released under the MIT license.

datastructures's People

Contributors

bruno-garcia avatar dshulepov avatar joshkeegan avatar julianmay avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.