implements binary search tree
adds specs to test graph forEachNode
implements graph with constant or linear time complexity functions