Count Processes Executed Out of Order
Asked at Amazon · Coding Questions · Difficulty: Medium
`required_sequence` and `actual_sequence` are permutations of `1..n`. A process is "accurate" if every process that should precede it (per `required_sequence`) was actually executed before it. Return the count of processes that fail this condition.
Loading the problem…