Any Java Solution for this problem?

Would like to know how arrayList is handled in this .

You can use list get and set methods to handle this

Click here to start solving coding interview questions