CodeX
Published in

CodeX

Detect a Loop/Cycle in a Singly Linked List

A detailed examination of the Floyd cycle detection algorithm in Ruby

An illustrated representation of what a loop within a Singly Linked List could look like

In our discussions of Data Structures and Algorithms in Ruby we have investigated Singly Linked Lists and applied some standard methods on them including #push, #pop, #shift, #unshift, #get, #set, #remove, and #reverse. See here and here for the two articles going through…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Anthony Lepore

Anthony Lepore

Composer, playwright, designer for theater, jazz musician, philosopher, software engineer and technical writer for a FinTech firm in NYC. More: ViolaCello93.com