operation data[jval data append(valuedata insert(kvaluedata popdata pop(kdel data[kdata remove(valuedata extend(data data +data data reversedata sortrunning time ( ( ) ( ) ( ) ( ) ( ) ( ) (no( log namortized table asymptotic performance of the mutating behaviors of the list class identifiers datadata and data designate instances of the list classand nn and their respective lengths adding elements to list in section we fully explored the append method in the worst caseit requires (ntime because the underlying array is resizedbut it uses ( time in the amortized sense lists also support methodwith signature insert(kvalue)that inserts given value into the list at index < < while shifting all subsequent elements back one slot to make room for the purpose of illustrationcode fragment provides an implementation of that methodin the context of our dynamicarray class introduced in code fragment there are two complicating factors in analyzing the efficiency of such an operation firstwe note that the addition of one element may require resizing of the dynamic array that portion of the work requires (nworst-case time but only ( amortized timeas per append the other expense for insert is the shifting of elements to make room for the new item the time for def insert(selfkvalue)"""insert value at index kshifting subsequent values rightward ""(for simplicitywe assume < < in this verionnot enough room if self =self capacityso double capacity self resize( self capacityshift rightmost first for in range(self nk- )self [jself [ - store newest element self [kvalue self + code fragment implementation of insert for our dynamicarray class