Problem: Sort Threats by Severity and Exploitability
med
30 min
Try to solve the Sort Threats by Severity and Exploitability problem.
Statement
You are given a 2extD integer array threats, where threats[i]=[extIDi,extsevi,extexpi] represents a threat with an identifier $ ext{ID}_i$, severity score $ ext{sev}_i$, and exploitability score $ ext{exp}_i$.
The total threat score for each threat is calculated as:
Examples
Fetching Slides...
Understand the problem
Now, let’s take a moment to make sure you’ve correctly understood the problem. The quiz below helps you check if you’re solving the correct problem:
Sort Threats by Severity and Exploitability
1.
For the input [[999999,1000000000,1000000000]], what is the sorted output? The threat score is calculated as (2 \times \text{severity} + \text{exploitability}).
A.
[[999999,1000000000,1000000000]]
B.
[[1000000000,999999,1000000000]]
C.
[[999999,1000000000,999999]]
D.
[]
1 / 5
Figure it out!
We have a game for you to play. Rearrange the logical building blocks to develop a clearer understanding of how to solve this problem.
Sequence - Vertical
Drag and drop the cards to rearrange them in the correct sequence
1
2
3
4
5
Try it yourself
Implement your solution in the following coding playground.
Problem: Sort Threats by Severity and Exploitability
med
30 min
Try to solve the Sort Threats by Severity and Exploitability problem.
Statement
You are given a 2extD integer array threats, where threats[i]=[extIDi,extsevi,extexpi] represents a threat with an identifier $ ext{ID}_i$, severity score $ ext{sev}_i$, and exploitability score $ ext{exp}_i$.
The total threat score for each threat is calculated as:
Examples
Fetching Slides...
Understand the problem
Now, let’s take a moment to make sure you’ve correctly understood the problem. The quiz below helps you check if you’re solving the correct problem:
Sort Threats by Severity and Exploitability
1.
For the input [[999999,1000000000,1000000000]], what is the sorted output? The threat score is calculated as (2 \times \text{severity} + \text{exploitability}).
A.
[[999999,1000000000,1000000000]]
B.
[[1000000000,999999,1000000000]]
C.
[[999999,1000000000,999999]]
D.
[]
1 / 5
Figure it out!
We have a game for you to play. Rearrange the logical building blocks to develop a clearer understanding of how to solve this problem.
Sequence - Vertical
Drag and drop the cards to rearrange them in the correct sequence
1
2
3
4
5
Try it yourself
Implement your solution in the following coding playground.