Cycles detection in oriented graphs