TikTok interview question

Directed graph traversal & top K elements max heap