code: func (c *LeveledCompactor) selectOverlappingDirs(ds []dirMeta) []string {
  	if len(ds) < 2 {
  		return nil
  	}
  	var overlappingDirs []string
  	globalMaxt := ds[0].meta.MaxTime
  	for i, d := range ds[1:] {
  		if d.meta.MinTime < globalMaxt {
  			if len(overlappingDirs) == 0 { // When it is the first overlap, need to add the last one as well.
  				overlappingDirs = append(overlappingDirs, ds[i].dir)
  			}
  			overlappingDirs = append(overlappingDirs, d.dir)
  		} else if len(overlappingDirs) > 0 {
  			break
  		}
  		if d.meta.MaxTime > globalMaxt {
  			globalMaxt = d.meta.MaxTime
  		}
  	}
  	return overlappingDirs
  }
docs: // selectOverlappingDirs returns all dirs with overlapping time ranges.
  // It expects sorted input by mint and returns the overlapping dirs in the same order as received.