Aerotek interview question

Jar Problem