CodeX
Published in

CodeX

Data Structures & Algorithms in Ruby: Depth-First Search (Pre-order) for Binary Trees

In continuing with our current topic of binary tree traversals in Ruby, we are going to introduce depth-first search this week. If you recall from the last article on breadth-first search, a traversal through a binary tree should be accomplished by visiting each node on the tree only once. That part of the tree traversal should remain a…

--

--

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