Return a topological ordering of a graph

Read the full interview experience this question came from →

Quick Overview

This question evaluates understanding of graph algorithms—particularly topological sorting and cycle detection—and competency in ordering dependencies in directed acyclic graphs.

Return a topological ordering of a graph

Company: Microsoft

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: hard

Interview Round: Technical Screen

Overview: This question evaluates understanding of graph algorithms—particularly topological sorting and cycle detection—and competency in ordering dependencies in directed acyclic graphs.

Read the full Microsoft Software Engineer interview experience this question came from

|Home/Coding & Algorithms/Microsoft
Microsoft logo
Microsoft
Jan 22, 2026
hardSoftware EngineerTechnical ScreenCoding & Algorithms
5
0
Loading...