3631. Sort Threats by Severity and Exploitability
You are given a 2D integer array
threats, where eachthreats[i] = [IDi, sevi, expi]
IDi: Unique identifier of the threat.sevi: Indicates the severity of the threat.expi: Indicates the exploitability of the threat.The score of a threat
iis defined as:score = 2 × sevi + expiYour task is to return
threatssorted in descending order of score.If multiple threats have the same score, sort them by ascending ID.
1 | class Solution { |