I have just written the algorithm below to get the largest possible number by inserting any specific number.
getLargestPossible receives two arguments and aims at fin