ContiguousSequenceTracker

This class accepts insertions of integers in a random order and tracks the maximum sequence of contiguous integers that has been provided. You must not provide the same integer multiple times. An example use is async parallel requests for an indexed resource, and then filtering the responses for N in a row that have some property

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var maxSeq: Int
Link copied to clipboard
Link copied to clipboard
val size: Int

Functions

Link copied to clipboard
fun clear()
Link copied to clipboard
fun insert(item: Int)