Tree: Height of a Binary Tree

  • + 1 comment

    You muppets. The javascript implementation contains all nodes in the right. Creating a right skewed tree.

    e.g.

    {
        "data": 3,
        "left": null,
        "right": {
            "data": null,
            "left": null,
            "right": {
                "data": null,
                "left": null,
                "right": {
                    "data": null,
                    "left": null,
                    "right": {
                        "data": null,
                        "left": null,
                        "right": null
                    }
                }
            }
        }
    }