Shutterstock interview question

asked multiple CS and JS questions