Closed
Description
Unlike with lists, for arrays these operations make quite as much sense from both ends of the data structure, yet vector
only offers them from the left, i.e. searching over ascending indices.
Is it possible to write an efficient† high-level implementation of the descending version, in terms of the already existing functions? Else I would like to request a right-starting version at least of findIndex
, which would readily allow defining the others too.
†By efficient I mean, comparable to a C implementation that runs an interrupted loop over a descending array-index. It should definitely be only O (n – k), not O (n) or O (k) where n is the number of elements and k the rightmost matching index.
Metadata
Metadata
Assignees
Labels
No labels