arrays indexofitem )returns the index of the vector element containing the given item the item must be in the list extendothervector )extends this vector by appending the entire contents of the othervector to this vector subvectorfromto )creates and returns new vector that contains subsequence of the items in the vector between and including those indicated by the given from and to positions both the from and to positions must be within the valid range iterator ()creates and returns an iterator that can be used to traverse the elements of the vector in typical vector adtthe size of the underlying array decreases after sufficient number of items have been removed devise strategy for decreasing the size of the array as items are removed modify your implementation of the vector adt from the previous question to include your reduction strategy grayscale digital image is two-dimensional raster image in which the picture elementsor pixelsstore single value representing shade of gray that varies from black to white in discrete grayscale imagethe shades of gray are represented by integer values in the range [ ]where is black and is white we can define the grayscale image adt for storing and manipulating discrete grayscale digital images given the description of the operationsprovide complete implementation of the adt using - array grayscaleimagenrowsncols )creates new instance that consists of nrows and ncols of pixels each set to an initial value of width()returns the width of the image height()returns the height of the image clearvalue )clears the entire image by setting each pixel to the given intensity value the intensity value will be clamped to or if it is less than or greater than respectively getitem rowcol )returns the intensity level of the given pixel the pixel coordinates must be within the valid range setitem rowcolvalue )sets the intensity level of the given pixel to the given value the pixel coordinates must be within the valid range the intensity value is clamped to or if it is outside the valid range playing board games on computer is very common we can use abstraction to aide in the design of board game by separating the game logic from the actual user interaction required to play the game no matter the type of user interface provided to play the game ( text baseddesktop windowing environmentor web browser)the underlying logic remains the same consider the game of reversiwhich was invented in but has more modern set of rules dating back to the reversi is played by two players on game