Letλ 1 >λ 2 >…>λ d be points on the real line. For everyk=1, 2, …, d, thek-alternatingpolynomialP k is the polynomial of degreekand norm ‖P k ‖ ∞ =max 1⩽l⩽d {|P k (λ l )|}⩽1 that attains maximum absolute value at any pointλ∉[λ d , λ 1 ]. Because of this optimality property, these polynomials may be thought of as the discrete version of the Chebychev polynomialsT k and, for particular values of the given points,P k coincides in fact with the “shifted”T k . In general, however, those polynomials seem to bear a much more involved structure than Chebychev ones. Some basic properties of theP k are studied, and it is shown how to compute them in general. The results are then applied to the study of the relationship between the (standard or Laplacian) spectrum of a (not necessarily regular) graph or bipartite graph and its diameter, improving previous results.