This language bar is your friend. Select your favorite languages!

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.

#Edit dateEdit SummaryEditor
👁 Δ 44 2019-10-14, 12:21 [Elixir] Dead link: play.elixirbyexample.com has been down for a while programming-idioms.org
👁 Δ 43 2019-09-30, 13:06 [Cpp] missed a member in the struct Raj
👁 Δ 42 2019-09-28, 06:03 New Fortran implementation by user [pompito] pompito
👁 Δ 41 2019-09-28, 00:30 New Cpp implementation by user [chardan] chardan
👁 Δ 40 2019-09-27, 10:16 [PHP] Format code snippet to PSR-12 ancarda
👁 Δ 39 2019-09-27, 07:45 New Perl implementation by user [daxim] daxim
👁 Δ 38 2019-09-27, 03:58 New Python implementation by user [atdt] atdt
👁 Δ 37 2019-09-26, 23:29 [Ruby] Should also have a place to store the value. seigel
👁 Δ 36 2019-09-26, 23:15 New Caml implementation by user [roryg] roryg
👁 Δ 35 2019-09-26, 20:28 New Clojure implementation by user [tkoenig] tkoenig
👁 Δ 34 2019-09-26, 16:42 [Lisp] Improve readability Dirk
👁 Δ 33 2019-09-26, 16:39 New Lisp implementation by user [Dirk] Dirk
👁 Δ 32 2019-06-07, 10:22 [Haskell] Made it more readable and typeable schuelermine
👁 Δ 31 2019-01-23, 17:30 [JS] Removed bad comma 1.7.4
👁 Δ 30 2019-01-23, 17:29 New JS implementation by user [1.7.4] 1.7.4
👁 Δ 29 2019-01-23, 17:28 New JS implementation by user [1.7.4] 1.7.4
👁 Δ 28 2018-04-03, 08:21 New Lua implementation by user [Kng] Kng
👁 Δ 27 2017-06-12, 15:33 New Scheme implementation by user [Dodopod] Dodopod
👁 Δ 26 2017-02-07, 23:33 [Elixir] No need for sample values. +DemoURL programming-idioms.org
👁 Δ 25 2016-12-04, 22:16 [Java] +DemoURL programming-idioms.org
👁 Δ 24 2016-12-04, 21:43 Linked to idiom #17 [Create a Tree data structure] programming-idioms.org
👁 Δ 23 2016-11-29, 09:00 [Rust] Missing comma, iiuc programming-idioms.org
👁 Δ 22 2016-11-23, 10:23 [C] Indentation programming-idioms.org
👁 Δ 21 2016-07-12, 21:07 New Erlang implementation by user [elbrujohalcon] elbrujohalcon
👁 Δ 20 2016-03-28, 12:33 New PHP implementation by user [agilla1]
👁 Δ 19 2016-02-20, 17:34 New Csharp implementation by user [Marti_2203]
👁 Δ 18 2016-02-18, 16:57 New Python implementation by user [TinyFawks]
👁 Δ 17 2016-02-16, 19:42 New Python implementation by user [TinyFawks]
👁 Δ 16 2016-02-16, 17:09 [C] typo
👁 Δ 15 2016-02-16, 17:08 New C implementation by user [chai416]
👁 Δ 14 2015-11-30, 12:37
👁 Δ 13 2015-10-29, 14:05
👁 Δ 12 2015-09-13, 17:54
👁 Δ 11 2015-09-13, 17:48
👁 Δ 10 2015-09-13, 17:11
👁 Δ 9 2015-09-05, 15:30
👁 Δ 8 2015-09-05, 10:53
👁 Δ 7 2015-09-03, 17:18
👁 Δ 6 2015-08-24, 07:16
👁 Δ 5 2015-08-24, 01:48
👁 Δ 4 2015-08-22, 23:16
👁 Δ 3 2015-08-22, 21:08
👁 Δ 2 2015-08-21, 08:00
1 2015-05-06, 21:04