An antimagic labeling of a graph G is a bijection from the set of edges E(G) to {1,2,…,|E(G)|}, such that all vertex sums are pairwise distinct, where the vertex sum at vertex u is the sum of the labels assigned to the edges incident to u. A graph is called antimagic when it has an antimagic labeling. Hartsfield and Ringel conjectured that every simple connected graph other than K2 is antimagic and the conjecture remains open even for trees. Here, we prove that caterpillars are antimagic by means of an O(nlogn) algorithm.Antoni Lozano is supported by the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement ERC-2014-CoG 648276 AUTAR). Mercè Mora is supported by projects Ge...