Returns a List with the paths sorted by length.
List<List<Node<T>>> sortedPathsByLength() => sorted((a, b) => a.length.compareTo(b.length)).toList();