diff options
| author | mo <mokha@cisco.com> | 2017-06-17 09:14:24 -0600 |
|---|---|---|
| committer | mo <mokha@cisco.com> | 2017-06-17 09:14:24 -0600 |
| commit | 9a03cbffe387a09385083ecc92830ef521483840 (patch) | |
| tree | f99b531be6ee1f84bb90207e05d3c3ac50a41873 /lib | |
| parent | 718a1399e24429dbb089d798209885bfd19b71c1 (diff) | |
collapse line.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/detect_circles.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/detect_circles.rb b/lib/detect_circles.rb index 7ccaa47..467b56a 100644 --- a/lib/detect_circles.rb +++ b/lib/detect_circles.rb @@ -11,11 +11,10 @@ def circle?(head) until hare.nil? return true if tortoise == hare - tortoise = tortoise.next_item - hare = hare.next_item&.next_item + tortoise, hare = tortoise.next_item, hare.next_item&.next_item end - return false + false end class Node |
