Skip to main content

Practice ยท 2 of 3

Predict Destruction Order

Implement teardownOrder(int n) returning the destruction order of n guard objects numbered 1..n constructed in order inside one scope, as a comma-joined string like "3,2,1".

Difficulty: advanced

Back to lesson: Practice: Lifetime Clinic