Completed Eulerian Cycle detection algorithm in linear time