Persistent Systems Interview Question

They will ask you to write the code