O'Reilly logo

Neo4j Cookbook by Ankur Goel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a binary search tree with Neo4j

One of the powerful use cases of the Neo4j graph database is to create scalable in-graph data structures, such as linked lists, trees, and so on. In this recipe, you will learn how to create a binary search tree from the Neo4j graph database.

Getting ready

Install the Neo4j graph database on the host machine using the recipe described in Chapter 1, Getting Started with Neo4j. This installation process will depend on your preference for the machine OS type.

How to do it...

By definition, a data structure should have nodes, where each node has a comparable key and an associated value. If any node satisfies the restriction that the key in any node is larger than the keys in all the nodes, then this becomes the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required