TikTok Frontend Interview Rounds

[[a,c], [b, c], [c, d], [d,e]]
Return a list of users, with the follower listed before their celebrity. If there is a circular relation, return an empty list.

I just started practicing coding problems, without much preparation, hoping to avoid having a blank mind, which would be embarrassing.
I can only try out all the knowledge points I can think of, and then ask the interviewer for feedback. The interviewer is very professional, providing me with guidance until I come up with a brute force solution.