Skip to content

antonioaversa/MoreStructures

Repository files navigation

Data structures and algorithms for .NET6

License

MoreStructures is a library of classical algorithms and data structures, written 100% in (safe, managed) C# 10, for .NET 6 and above.

Built for fun and education, it has been implemented with readability and maintenability in mind, minimizing external dependencies and trying to make it easy for everybody to modify and extend.

All its public API are documented and it is fully unit tested, with more than 2400 test scenarios and 100% line and branch coverage.

Data structures implemented include:

  • Stacks: array-list, linked-list;
  • Queues: array-list, linked-list;
  • Priority Queues: array-list, binary heaps, binomial heaps, Fibonacci heaps;
  • Disjoint Sets: quick find, quick union, weighted, path compression;
  • Trees: recursive immutable n-ary trees;
  • Graphs: edge list, adjacency list, adjacency matrix;
  • Suffix Trees: edge compression;
  • Suffix Tries: standard.

Algorithms implemented include:

  • String sorting: counting sort, quicksort;
  • List searching: linear, binary;
  • List sorting: selection, insertion, Shell, heap;
  • String matching: Burrows-Wheeler transform, suffix arrays, Knuth-Morris-Pratt;
  • Tree augmentation: counting;
  • Tree visit: DFS, BFS, in iterative and recursive forms;
  • Graphs visits: DFS, BFS, in iterative and recursive forms;
  • Graphs minimum spanning tree: Kruskal, Prim;
  • Graphs shortest distance: Dijkstra, bidirectional Dijkstra, Bellman-Ford, BFS-based, A*, bidirectional A*;
  • Graphs shortest path: BFS-based;
  • Graphs topological sorting: DFS on each vertex, any path to sink, single DFS sink-based;
  • Graphs strongly connected components: sink-based;
  • Suffix Trees construction: naive, Ukkonen, LCP-based;
  • Suffix Trees matching: exact pattern matching, shortest non-shared substring;
  • Suffix Tries construction: naive;
  • Suffix Tries matching: exact pattern matching.

Install

.NET6 Nuget .NET6 Nuget Pre

Via NuGet Package Manager:

Install-Package MoreStructures

Via dotnet CLI:

dotnet add package MoreStructures

Build

.NET6 Build and Test .NET6 Coverage

Reliability Rating Vulnerabilities Security Rating Maintainability Rating

The latest detailed Tests Report for the .NET Libraries is available here.

The latest detailed Code Coverage Report for the .NET Libraries is available here.

Status

Issues Pull Requests Pull requests Downloads

Documentation

The latest documentation for the .NET Libraries is available here.