Maximum Number by Inserting Five
Given an integer n
, return the maximum number you can make by inserting 5
anywhere in the number.
https://binarysearch.com/problems/Maximum-Number-by-Inserting-Five
Examples
Example 1
Input
- n =
-234
Output
- answer =
-2345
Example 2
Input
- n =
1
Output
- answer =
51
Example 3
Input
- n =
923
Output
- answer =
9523
Leave a comment