CodeX
Published in

CodeX

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

We have now come of the final of the three main types of Depth-First Search (DFS) for a Binary Search Tree: In-Order traversal. DFS In-Order, as far as I am concerned, is probably the most useful as the return values are delivered as a sorted array from lowest to highest value.

First, a very brief recap of what we covered so far for Binary Search Tree traversals:

· A Binary Search Tree is a data structure wherein each node has at most two child-nodes (hence the…

--

--

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