The name path from the top to an employee
For each employee in emp, build the chain of names from the topmost manager down to them, joined by > (e.g. CEO > VP-Eng > EngMgr). Return id and path, ordered by id.
Voorbeeld van verwachte uitvoer
Zo ziet een correct antwoord eruit — het aantal rijen is op zichzelf staand en hoeft niet overeen te komen met de schematabellen.
| id | path |
|---|---|
| 1 | CEO |
| 2 | CEO > VP-Eng |
| 3 | CEO > VP-Sales |
Log in om je inzendingsgeschiedenis te zien
InloggenLog in om de AI-mentor te gebruiken
Inloggen