Your question is Prioritizing Bugs by Severity. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Commvault Command Center displays defects that QA engineers must review in a consistent order. Implement a function that ranks defects by severity first, impact second, and creation time third.
Write prioritize_defects(defects), where defects is a list of dictionaries. Each dictionary contains:
id: a unique string identifying the defectseverity: one of "Critical", "High", "Medium", or "Low"impact: one of "Widespread", "Major", "Limited", or "Minimal"created_at: a non-negative integer timestamp, where a smaller value means the defect was created earlierReturn a list of defect IDs ordered by these rules:
created_at.Do not modify the input list or its dictionaries.
def prioritize_defects(defects):