code: private boolean searchAll(Node<K, V> x, Interval1D<K> interval, List<Node<K, V>> toAppend) {
      boolean found1 = false;
      boolean found2 = false;
      boolean found3 = false;
      if (x == null) {
        return false;
      }
      if (interval.intersects(x.interval)) {
        toAppend.add(x);
        found1 = true;
      }
  
      if (x.left != null && x.left.max.compareTo(interval.lo) >= 0) {
        found2 = searchAll(x.left, interval, toAppend);
      }
      if (found2 || x.left == null || x.left.max.compareTo(interval.lo) < 0) {
        found3 = searchAll(x.right, interval, toAppend);
      }
      return found1 || found2 || found3;
    }
docs: look in subtree rooted at x