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 ...

Get Neo4j Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.