Question: you are given two strings, s and t , both length of n . both string are made up of digits. In a single move,

you are given two strings, s and t, both length of n. both string are made up of digits. In a single move, you can select an index K within a range [0...N-2] and increase the digits S[K] and S[K+1] by 1. If a digit 9 is increased it becomes 0. Is it possible to transform S into T by performing some (possibly zero) number of such moves needed ?
write function
class Solution ( public int solution(StringS, String T):)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!