a np-hard problem and a immutableQueue

This is the questions by works applications in 2014-4 for intern
Qunaer software develop

This is the Problems I get in the writting examinations from qunaer.
NetEase software test,functions in ArrayList

The questions I get from netease ,software test job, he ask me how many
functions I can say in ArrayList