Available question text
Given a DAG with node scores, find a topological ordering that maximizes the sum of score[i] * position(i) (positions are 1-based) while respecting all edge precedence constraints. With n ≤ 22 the core challenge is optimizing the order under partial-order constraints—typically solved by bitmask DP that schedules higher-score nodes as late as possible subject to dependencies.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 3530. Maximum Profit from Valid Topological Order in DAG
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source