If string violates tidy property , then decrease the value stored at that index by 1 and replace all the value stored right to that index by 9
str [ i ] -- ; for ( j = i + 1 ; j < len ; j ++ ) str [ j ] = ' ' ; } } return str . join ( " " ) ; }