Create DetectingCycles.java

Detecting number cycles in a list of number sequence