Commit eb96a99

mo <mokha@cisco.com>
2017-06-21 20:06:23
add next part to the problem.
1 parent 3299f17
Changed files (1)
lib/detect_circles.rb
@@ -1,6 +1,10 @@
 <<-DOC
 You are given a single linked list, and you are asked to determine if there is a circle inside it
 A circle means, a -> b -> c -> b, then it is a circle
+
+Part 2.
+Could you get the length of the circle for the input single linked list if there is one, or output 0 if there is no circle? (O(1) space and O(n) time complexity)
+
 DOC
 require 'byebug'