length method

  1. @override
int length()
override

Returns the amount of items that this contains.

Example: If the tree is built with 1, 2, 3, 4, 5, then length() will return 5.

Implementation

@override
int length() => array.length - 1;