Question: Sublists and concatenation (Python) Add the following functionality to your class (this will only be tested with integer values). sublist(self, start, length) Returns a new
Sublists and concatenation (Python)
Add the following functionality to your class (this will only be tested with integer values).
sublist(self, start, length)
Returns a new ArrayList with values from self
First value at start
length is the number of values copied
If start and length would go outside current list, raise IndexOutOfBounds()
concatenate(self, other)
Returns a new ArrayList with values from self and other
All the values from self
Followed by all the values from other
Bonus if both these operations are implemented recursively and without unnecessary copying of data
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
