Logo

Programming-Idioms

History of Idiom 9 > diff from v43 to v44

Edit summary for version 44 by programming-idioms.org:
[Elixir] Dead link: play.elixirbyexample.com has been down for a while

Version 43

2019-09-30, 13:06:30

Version 44

2019-10-14, 12:21:35

Idiom #9 Create a Binary Tree data structure

The structure must be recursive because left child and right child are binary trees too. A node has access to children nodes, but not to its parent.

Idiom #9 Create a Binary Tree data structure

The structure must be recursive because left child and right child are binary trees too. A node has access to children nodes, but not to its parent.

Code
defmodule BinaryTree do
	defstruct data: nil, left: nil, right: nil
end
Code
defmodule BinaryTree do
	defstruct data: nil, left: nil, right: nil
end
Demo URL
http://play.elixirbyexample.com/s/bf451110f2