QGenda interview question

9 balls logic question