Question: solve it in c++/python/java In BigBinary we play a game called Very close words. In the game, we will be given two words say x

solve it in c++/python/java

solve it in c++/python/java In BigBinary we play a game called "Very

close words". In the game, we will be given two words say

In BigBinary we play a game called "Very close words". In the game, we will be given two words say x and y. The aim of the game is to verify whether these two words are very close words or not. We can say that the word x is a very close word of y if we can: - Take a single character from x and substitute it with some other character in order to get y. Note: Only one character can be substituted. - Take a single character from x and remove it from x in order to get y. Note: Only one character can be removed. - Add a new character to x to get y. Note: Only one character can be added. The output should be boolean, that is either true or fal sh. Both x and y will be strings. - Add a new character to x to get y. Note: Only one character can be added. The output should be boolean, that is either true or false. Both x and y will be strings. Example 1: Input ab acb Output true Explanation: Input: x= "ab", y= "acb" Output: true We can add ' c " into x to get y. Example 2: Input un Output true Explanation: Input: x=,y= Output: false We cannot get x from y by only one step. Constraints: -

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!