Cycles In Edge-Coloured Graphs And Subgraphs Of Random Graphs