Skip to content

m-khooryani/RangeMinimumQuery

Repository files navigation

RangeMinimumQuery

Generic Range Minimum Query Implementation in .NET (using Segment Tree)

calculate each query in O(log N), preprocessing in O(N)

var values = new int[] { 5, 3, 2, 1, 9 };
var rmq = new RMQ<int>(values);

Assert.Equal(1, rmq.Query(start: 0, end: 5));
Assert.Equal(2, rmq.Query(start: 0, end: 3));

About

Generic Range Minimum Query Implementation in .NET

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages