maxn
In programming, maxn (often written as MAXN or maxN) is a conventional identifier used to denote the maximum size of a collection, such as the number of elements, nodes, or positions that a program must support. It is not a language feature; rather, it is a naming convention in source code, particularly in competitive programming templates.
Usage: In contest templates, maxn is defined as a compile-time constant to allocate static arrays or adjacency
Naming and alternatives: Variants include MAXN, NMAX, or maxN; some projects prefer more descriptive names such
Practical considerations: Choosing maxn too small causes out-of-bounds access; too large wastes memory. In languages with
Other uses: maxn can also appear in problem statements as a symbol representing the upper bound of