Added the implementation of the functions getRoundMax and getTotalArr