You are given a string num representing a large integer and an integer array change of length
You may mutate at most one contiguous substring of num. To mutate a substring, replace each individual digit d in the chosen substring with the corresponding digit change[d].
Return a string representing the largest number that can be formed after applying this operation.
Note: A substring is a contiguous sequence of characters within a string.
Constraints:
num.length
num consists of only digits from
change.length
change[d]
You are given a string num representing a large integer and an integer array change of length
You may mutate at most one contiguous substring of num. To mutate a substring, replace each individual digit d in the chosen substring with the corresponding digit change[d].
Return a string representing the largest number that can be formed after applying this operation.
Note: A substring is a contiguous sequence of characters within a string.
Constraints:
num.length
num consists of only digits from
change.length
change[d]