Deloitte interview question

Write a trigger on the given scenario