Count Substrings That Differ By One Character

medium
1. You are given 2 String's s and t.
2. Find the number of substrings in s that differ from some substring in t by exactly one character.

For example, the underlined substrings in "<span style="text-decoration: underline;">compute</span>r" and "<span style="text-decoration: underline;">computa</span>tion" only differ by the 'e'/'a', so this is a valid way.

Input Format

Input is managed for you

Output Format

Output is managed for you

Constraints

1. 1 <= s.length, t.length <= 100
2. s and t consist of lowercase English letters only.

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

Example

Input
aba
baba
Output
6
Previous
Alien Dictionary
Next
Palindrome Pairs

Related Questions