@Override
	public Optional<FlatTreeNode<V>> parent() {
		int index = NULL_INDEX;
		for (int i = _index; --i >= 0 && index == NULL_INDEX;) {
			if (isParent(i)) {
				index = i;
			}
		}

		return index != NULL_INDEX
			? Optional.of(nodeAt(index))
			: Optional.empty();
	}
Returns the root of the tree that contains this node. The root is the
ancestor with no parent. This implementation has a runtime complexity
of O(1).

@return the root of the tree that contains this node
jenetics.ext/src/main/java/io/jenetics/ext/util/FlatTreeNode.java