class NgLib:: DynamicRangeFrequency(T)

Overview

長さ n の整数列 a0,a1,,an1 について、 [l,r)x が何回現れるかを O(logN) で計算するクラスです。

Defined in:

nglib/data_structure/dynamic_range_frequency.cr

Constructors

Instance Method Summary

Constructor Detail

def self. new (array : Array(T)) #

[ View source ]

Instance Method Detail

def []= (i : Int , x : T) #

[ View source ]
def count (range : Range( Int | Nil, Int | Nil), x : T) #

[ View source ]