the algorithm performs traversal of the arraywith constant amount of computation per entrya nested conditionalfollowed by another traversal of the arraywith constant amount of computation per entry hencethe time complexity is (no( (no(nthe additional space complexity is ( )corresponding to the local variables variantlet be as above compute an array where [iis the product of all elements in except [iyou cannot use division your time complexity should be ( )and you can only use ( additional space variantlet be as above compute the maximum over the product of all triples of distinct elements of