minidx
Minidx is a term used in programming and mathematics to denote the position of the smallest element in a sequence, such as an array or list. It refers to the index at which the minimum value occurs, rather than the value itself. In the presence of ties, a common convention is to select the first occurrence of the minimum value.
Formally, for a sequence a[1..n], the minidx is the index i such that a[i] is less than
Computationally, minidx can be found by a simple linear scan: traverse the sequence, keeping track of the
Common variants and related concepts include argmin, which is the value that minimizes a function rather than
Edge cases include an empty sequence, for which minidx is undefined and may raise an error or