These questions are commonly reported in Snap interviews.
Graph Acyclicity with DFS
Top-K with Filtering