Find root IDs and paths | ZipHQ Interview Question