sets and maps design and implement the iterator class mapiterator for use with the map adt implemented using list develop the index equation that computes the location within - array for element (ijof - array stored in column-major order the - array described in is simple rectangular structure consisting of the same number of elements in each row other layouts are possible and sometimes required by problems in computer science for examplethe lower triangular array shown on the right is organized such that the rows are staggered with each successive row consisting of one more element than the previous row (aderive an equation that computes the total number of elements in the lower triangular table for table of size (bderive an index equation that maps an element of the lower triangular table onto one-dimensional array stored in row-major order complete the implementation of the multiarray class by implementing the helper method computefactors(programming projects in this we implemented the set adt using list implement the set adt using bag created from the bag class in your opinionwhich is the better implementationexplain your answer define new class named trianglearray to implement the lower triangular table described in exercise given collection of items stored in bagdesign linear time algorithm that determines the number of unique items in the collection write function that extracts the sales data from text file and builds the - array used to produce the various reports in section assume the data file has the format as described in the write menu-driven program that uses your function from the previous question to extract the sales data and can produce any of the following reports(aeach of the four types of reports described in the (bthe sales for single store similar to that shown in section with the data sorted by total sales (cthe total sales for each store sorted by total sales from largest to smallest (dthe total sales for each item sorted by item number