as indicated in the when list is created using the replication operator values none the size of the underlying array used to implement the list can be up to twice the size actually needed this extra space is beneficial to the list itselfbut it can be quite wasteful when list is used to implement some abstract data types consider the implementation of the array abstract data type as described in the if we had used list of lists to implement the adtinstead of the array of arraysa large amount of extra storage space would be allocated that would never be used calculate the number of elements that will be allocated when using an array of arrays implementation and list of lists implementation of the array abstract data type for each of the following - array sizes( ( ( programming projects while python provides the built-in list type for constructing and managing mutable sequencesmany languages do not provide such structureat least not as part of the language itself to help in further understanding how python' built-in list worksimplement the vector adt using the array class implemented in the your implementation should produce mutable sequence type that works like python' list structure when the underlying array needs to be expandedthe new array should double the size of the original the operations that can be performed on the adt are described below assume the size of the underlying array never decreases vector()creates new empty vector with an initial capacity of two elements length ()returns the number of items contained in the vector contains item )determines if the given item is contained in the vector getitem ndx )returns the item stored in the ndx element of the list the value of ndx must be within the valid range setitem ndxitem )sets the element at position ndx to contain the given item the value of ndx must be within the valid rangewhich includes the first position past the last item appenditem )adds the given item to the end of the list insertndxitem )inserts the given item in the element at position ndx the items in the elements at and following the given position are shifted down to make room for the new item ndx must be within the valid range removendx )removes and returns the item from the element from the given ndx position the items in the elements at and following the given position are shifted up to close the gap created by the removed item ndx must be within the valid range