/Sorting-In-Linear-Time

Sorting In Linear Time

Primary LanguageJava

Sorting-In-Linear-Time

Sorting in linear time Implement of an algorithm that, given 𝑛 integers in the range 0 to 𝑘, preprocesses its input and then answers any query about how many of the 𝑛 integers fall into a range [𝑎..𝑏] in 𝑂(1) time. Your algorithm should use Θ(𝑛+𝑘) preprocessing time.