Petco interview question

Basic oops in first round second round based on programming