Anti-Ramsey problems on graphs and hypergraphs