AlgoUniversity
  • Go Back
Discussion
Make Files Equall :

Author

Akshay Sharma

Difficulty Level : Easy

Submissions : 242

Asked In : Rubrik

Marks :100

: 4 | : 0

Given file1 and file2 of type string, you need to print the modification made in file1 to get file2. That if the element is removed from file1 to make file2 you need to append the -ve sign before it, If a new element is added in file1 to make a file, you need to append the +ve sign before it. (Similar to git diff)

Input

The fist line of input contains two strings st1 and str2($$$1 \le str1,str2 \le 10^5$$$) && ($$$ A \le str1[i] \le Z $$$).

Output

For each output print, the modification made separated with space

Example

Input
ABC BCDC
Output
-A B C +D

Note

Example:

File1: ABC

File2:BCD

Output will be : -A B C +D

You need to login to view your submissions.

You need to login to view all submissions.

Loading...

Result : Executed

Loading...

Feel something is wrong with the test cases?

Result : Accepted

Test Cases :

You need to Log In
We're glad that you want to attempt this problem!

But to Run or Submit the Problem, you need to Log In.

Continue to Log In
Challenge Submitted!

Your challenge has been submitted successfully.

You will get a response soon via WhatsApp or Email.

Challenge
Facing issue while trying to solve the problem! Don't worry, we got you covered!

Do let us know your issue.

Looks good!
Please enter your issue / feedback.

How do we get in touch with you?
Looks good!
Please enter your phone no.
Looks good!
Please enter your email address.