Cycle Detection In Graphs