Tap here to switch tabs
Problem
Submissions

Problem: Sort Threats by Severity and Exploitability

Try to solve the Sort Threats by Severity and Exploitability problem.

Statement

You are given a 2D integer array threats, where threats[i] = [ID, sev, exp] represents a threat with a unique identifier ID, a severity score sev, and an exploitability score exp.

The total threat score of each threat is calculated as 2 * sev + exp.

Return the array threats sorted in descending order of total threat score. If two threats have the same total threat score, the threat with the smaller ID comes first.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Sort Threats by Severity and Exploitability

Try to solve the Sort Threats by Severity and Exploitability problem.

Statement

You are given a 2D integer array threats, where threats[i] = [ID, sev, exp] represents a threat with a unique identifier ID, a severity score sev, and an exploitability score exp.

The total threat score of each threat is calculated as 2 * sev + exp.

Return the array threats sorted in descending order of total threat score. If two threats have the same total threat score, the threat with the smaller ID comes first.