last test failed for some reason
Last test case failed
Hi @itsmeshubhamkumar
Your code is failing for test cases when difference between characters is greater than 9. For example when input is aza your code is printing aIz-Ia but its correct output is a25z-25a. There is no need to take another string and increase space complexity. All we need to do is just traverse the whole string and for every two adjacent characters just calculate the ascii among them. We will print the characters and the difference between with characters
1 Like